@@ -5,12 +5,13 @@ module Text.Hakyll.Rss
55 ( RssConfiguration (..)
66 , renderRss
77 , renderRssWith
8+ , renderRssDate
89 ) where
910
1011import Control.Arrow ((>>>), second)
1112import Control.Monad.Reader (liftIO)
1213
13−import Text.Hakyll.Context (ContextManipulation)
14+import Text.Hakyll.Context (ContextManipulation, renderDate)
1415import Text.Hakyll.Hakyll (Hakyll)
1516import Text.Hakyll.Render (render, renderChain)
1617import Text.Hakyll.Renderables (createListingWith)
@@ -72,6 +73,11 @@ renderRssWith :: ContextManipulation -- ^ Manipulation to apply on the items.
7273renderRssWith manipulation configuration renderables = do
7374 template <- liftIO $ getDataFileName "templates/rss.xml"
7475 itemTemplate <- liftIO $ getDataFileName "templates/rss-item.xml"
75− let renderRssWith' = createRssWith manipulation configuration
76+ let renderRssWith' = createRssWith manipulation' configuration
7677 renderables template itemTemplate
7778 renderChain [] renderRssWith'
79+ where
80+ manipulation' = manipulation . renderRssDate
81+
82+renderRssDate :: ContextManipulation
83+renderRssDate = renderDate "timestamp" "%a, %d %b %Y %H:%M:%S %Z" "No date found."