on master help sign in
Add author name by default to RSS feeds
ac0fc61Calen Pennington
data/templates/rss-item.xml+1
@@ -4,4 +4,5 @@
4 <description><![CDATA[$description$]]></description>
4 <description><![CDATA[$description$]]></description>
5 <pubDate>$published$</pubDate>
5 <pubDate>$published$</pubDate>
6 <guid>$root$$url$</guid>
6 <guid>$root$$url$</guid>
7+ <dc:creator>$authorName$</dc:creator>
7</item>
8</item>
data/templates/rss.xml+3−2
@@ -1,5 +1,6 @@
1<?xml version="1.0" encoding="utf-8"?>
1<?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/">
3 <channel>
4 <channel>
4 <title>$title$</title>
5 <title>$title$</title>
5 <link>$root$</link>
6 <link>$root$</link>
@@ -8,5 +9,5 @@
8 type="application/rss+xml" />
9 type="application/rss+xml" />
9 <lastBuildDate>$updated$</lastBuildDate>
10 <lastBuildDate>$updated$</lastBuildDate>
10 $body$
11 $body$
11− </channel>
12+ </channel>
12</rss>
13</rss>
src/Hakyll/Web/Feed.hs+2
@@ -77,6 +77,8 @@ renderFeed feedPath itemPath config itemContext items = do
77
77
78 itemContext' = mconcat
78 itemContext' = mconcat
79 [ constField "root" (feedRoot config)
79 [ constField "root" (feedRoot config)
80+ , constField "authorName" (feedAuthorName config)
81+ , constField "authorEmail" (feedAuthorEmail config)
80 , itemContext
82 , itemContext
81 ]
83 ]
82
84