summaryrefslogtreecommitdiff
path: root/web/tutorials
diff options
context:
space:
mode:
authorJasper Van der Jeugt <m@jaspervdj.be>2013-01-08 20:14:54 +0100
committerJasper Van der Jeugt <m@jaspervdj.be>2013-01-08 20:14:54 +0100
commitf554afbec040f822ddf5dd62d71d33541c74a2ed (patch)
tree129611f1d17d23b0df0169a74166bd26e15b6dfb /web/tutorials
parent5948e1936fb86119bc404672a66e64f3daa5d990 (diff)
downloadhakyll-f554afbec040f822ddf5dd62d71d33541c74a2ed.tar.gz
Fix tutorial: needed makeItem
Diffstat (limited to 'web/tutorials')
-rw-r--r--web/tutorials/04-compilers.markdown6
1 files changed, 4 insertions, 2 deletions
diff --git a/web/tutorials/04-compilers.markdown b/web/tutorials/04-compilers.markdown
index cb963a6..ef2877b 100644
--- a/web/tutorials/04-compilers.markdown
+++ b/web/tutorials/04-compilers.markdown
@@ -156,7 +156,8 @@ We can reproduce a list of items in the archive using the following code:
compile $ do
posts <- recentFirst <$> loadAll "posts/*"
itemTpl <- loadBody "templates/post-item.html"
- applyTemplateList itemTpl postCtx posts
+ list <- applyTemplateList itemTpl postCtx posts
+ makeItem list
```
`recentFirst` sorts items by date. This relies on the convention that posts are
@@ -169,4 +170,5 @@ recentFirst :: [Item a] -> [Item a]
After loading and sorting the items, we load a template for the posts.
`applyTemplateList` applies this template to every post and concatenates the
-result, which is a simple `String`.
+result, which is a simple `String`. After that, we need `makeItem` to wrap the
+returned `String` to `Item String`.