diff options
author | Jasper Van der Jeugt <jaspervdj@gmail.com> | 2010-01-08 12:41:58 +0100 |
---|---|---|
committer | Jasper Van der Jeugt <jaspervdj@gmail.com> | 2010-01-08 12:41:58 +0100 |
commit | 699bd0011e9771cd5c03c65aec0ec79656c475a1 (patch) | |
tree | 8b2840edb78336d0de293744bc79bb96a14be29b /examples/rssblog | |
parent | b403d35b087683a7a38e57b943c63449613b3115 (diff) | |
download | hakyll-699bd0011e9771cd5c03c65aec0ec79656c475a1.tar.gz |
Added tagblog example (tutorial coming up).
Diffstat (limited to 'examples/rssblog')
-rw-r--r-- | examples/rssblog/hakyll.hs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/examples/rssblog/hakyll.hs b/examples/rssblog/hakyll.hs index 7ed1b8e..a0984c8 100644 --- a/examples/rssblog/hakyll.hs +++ b/examples/rssblog/hakyll.hs @@ -16,6 +16,12 @@ main = hakyll $ do postPaths <- liftM (reverse . sort) $ getRecursiveContents "posts" let renderablePosts = map createPagePath postPaths + -- Render index, including recent posts. + let recentPosts = renderAndConcat "templates/postitem.html" $ take 3 renderablePosts + renderChain ["index.html", "templates/default.html"] $ + createCustomPage "index.html" ("templates/postitem.html" : take 3 postPaths) + [("title", Left "Home"), ("posts", Right recentPosts)] + -- Render all posts list. let postItems = renderAndConcat "templates/postitem.html" $ renderablePosts renderChain ["posts.html", "templates/default.html"] $ |