Skip to content

Commit

Permalink
Add author name by default to RSS feeds
Browse files Browse the repository at this point in the history
  • Loading branch information
cpennington committed Feb 20, 2015
1 parent 35f65f7 commit ac0fc61
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions data/templates/rss-item.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@
<description><![CDATA[$description$]]></description>
<pubDate>$published$</pubDate>
<guid>$root$$url$</guid>
<dc:creator>$authorName$</dc:creator>
</item>
5 changes: 3 additions & 2 deletions data/templates/rss.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>$title$</title>
<link>$root$</link>
Expand All @@ -8,5 +9,5 @@
type="application/rss+xml" />
<lastBuildDate>$updated$</lastBuildDate>
$body$
</channel>
</channel>
</rss>
2 changes: 2 additions & 0 deletions src/Hakyll/Web/Feed.hs
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ renderFeed feedPath itemPath config itemContext items = do

itemContext' = mconcat
[ constField "root" (feedRoot config)
, constField "authorName" (feedAuthorName config)
, constField "authorEmail" (feedAuthorEmail config)
, itemContext
]

Expand Down

0 comments on commit ac0fc61

Please sign in to comment.