Merge pull request #332 from cpennington/author-name-rss
Add author name by default to RSS feeds
commit31b2294b1075ba7c4bd9d608c5a8eed0eef9b81d
authorJasper Van der Jeugt <jaspervdj@gmail.com>
dateSun 22 Feb 2015, 12:38 (12 years ago)
parent8f330a2ac0fc61
data/templates/rss-item.xml+1
@@ -4,4 +4,5 @@
44 <description><![CDATA[$description$]]></description>
55 <pubDate>$published$</pubDate>
66 <guid>$root$$url$</guid>
7+ <dc:creator>$authorName$</dc:creator>
78</item>
data/templates/rss.xml+3−2
@@ -1,5 +1,6 @@
11<?xml version="1.0" encoding="utf-8"?>
2−<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
2+<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"
3+ xmlns:dc="http://purl.org/dc/elements/1.1/">
34 <channel>
45 <title>$title$</title>
56 <link>$root$</link>
@@ -8,5 +9,5 @@
89 type="application/rss+xml" />
910 <lastBuildDate>$updated$</lastBuildDate>
1011 $body$
11− </channel>
12+ </channel>
1213</rss>
src/Hakyll/Web/Feed.hs+2
@@ -77,6 +77,8 @@ renderFeed feedPath itemPath config itemContext items = do
7777
7878 itemContext' = mconcat
7979 [ constField "root" (feedRoot config)
80+ , constField "authorName" (feedAuthorName config)
81+ , constField "authorEmail" (feedAuthorEmail config)
8082 , itemContext
8183 ]
8284