diff options
Diffstat (limited to 'examples/tagblog/hakyll.hs')
-rw-r--r-- | examples/tagblog/hakyll.hs | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/examples/tagblog/hakyll.hs b/examples/tagblog/hakyll.hs index 03dd488..c51007f 100644 --- a/examples/tagblog/hakyll.hs +++ b/examples/tagblog/hakyll.hs @@ -4,7 +4,7 @@ import Text.Hakyll (hakyll) import Text.Hakyll.Render import Text.Hakyll.Tags (readTagMap, renderTagCloud, renderTagLinks) import Text.Hakyll.File (getRecursiveContents, directory, removeSpaces) -import Text.Hakyll.Renderables (createPagePath, createCustomPage, createListingWith) +import Text.Hakyll.Renderables (createPagePath, createCustomPage, createListingWith, createListing) import Text.Hakyll.Context (ContextManipulation, renderDate) import Data.List (sort) import Data.Map (toList) @@ -46,14 +46,8 @@ main = hakyll $ do ]) renderablePosts -- Render rss feed - let recentRSSItems = renderAndConcat ["templates/rssitem.xml"] $ take 3 renderablePosts - let rssPage = createCustomPage "rss.xml" - ("templates/postitem.html" : take 3 postPaths) - [("items", Right recentRSSItems)] - renderChain ["templates/rss.xml"] rssPage - - -- Render index. - renderChain ["templates/default.html"] $ createPagePath "index.html" + let rss = createListing "rss.xml" "templates/rssitem.xml" (take 3 renderablePosts) [] + renderChain ["templates/rss.xml"] rss where postManipulation :: ContextManipulation postManipulation = renderDate "date" "%B %e, %Y" "Date unknown" |