summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRohan Jain <crodjer@gmail.com>2012-04-03 15:58:16 +0530
committerRohan Jain <crodjer@gmail.com>2012-07-13 11:57:08 +0530
commit1130d7e610b18a1975843f4ae219b7e7e80ae300 (patch)
treed7a6c04dfbe25f724d60c4bc437b1c2fc5ab2b27
parent3e6a8bae7a0f88c240a61bc2529ed5501a7df917 (diff)
downloadhakyll-1130d7e610b18a1975843f4ae219b7e7e80ae300.tar.gz
Add author email to feed
Signed-off-by: Rohan Jain <crodjer@gmail.com>
-rw-r--r--data/templates/atom.xml1
-rw-r--r--src/Hakyll/Web/Feed.hs3
2 files changed, 4 insertions, 0 deletions
diff --git a/data/templates/atom.xml b/data/templates/atom.xml
index 4a4eaaf..ef1faef 100644
--- a/data/templates/atom.xml
+++ b/data/templates/atom.xml
@@ -6,6 +6,7 @@
<id>$root$$url$</id>
<author>
<name>$authorName$</name>
+ <email>$authorEmail$</email>
</author>
<updated>$updated$</updated>
$body$
diff --git a/src/Hakyll/Web/Feed.hs b/src/Hakyll/Web/Feed.hs
index e7aecc9..f2f3342 100644
--- a/src/Hakyll/Web/Feed.hs
+++ b/src/Hakyll/Web/Feed.hs
@@ -45,6 +45,8 @@ data FeedConfiguration = FeedConfiguration
feedDescription :: String
, -- | Name of the feed author.
feedAuthorName :: String
+ , -- | Email of the feed author.
+ feedAuthorEmail :: String
, -- | Absolute root URL of the feed site (e.g. @http://jaspervdj.be@)
feedRoot :: String
} deriving (Show, Eq)
@@ -65,6 +67,7 @@ createFeed feedTemplate itemTemplate url configuration items =
$ trySetField "title" (feedTitle configuration)
$ trySetField "description" (feedDescription configuration)
$ trySetField "authorName" (feedAuthorName configuration)
+ $ trySetField "authorEmail" (feedAuthorEmail configuration)
$ trySetField "root" (feedRoot configuration)
$ trySetField "url" url
$ fromBody body