diff options
author | Jasper Van der Jeugt <jaspervdj@gmail.com> | 2010-01-29 15:16:08 +0100 |
---|---|---|
committer | Jasper Van der Jeugt <jaspervdj@gmail.com> | 2010-01-29 15:16:08 +0100 |
commit | 4f335aa6a2ffcd663c4bdb2c139bf4e1ea5237bf (patch) | |
tree | 2a20cb81317ca50d2666684ed50b5047b568f467 /examples/tagblog/hakyll.hs | |
parent | 8ff702589fb5a1a2e600b204970084466de58a09 (diff) | |
download | hakyll-4f335aa6a2ffcd663c4bdb2c139bf4e1ea5237bf.tar.gz |
Added categoryblog example.
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" |