diff options
author | Jasper Van der Jeugt <m@jaspervdj.be> | 2013-03-13 20:27:45 +0100 |
---|---|---|
committer | Jasper Van der Jeugt <m@jaspervdj.be> | 2013-03-13 20:27:45 +0100 |
commit | a72906095c1ea7b2d24ca4368f8165f15ac22059 (patch) | |
tree | 7a8982176a159400e1bee37891e5eca2b654eac8 /web/tutorials | |
parent | d840363bf0edbbd703e1a7d2e2700c5feeedbbc6 (diff) | |
download | hakyll-a72906095c1ea7b2d24ca4368f8165f15ac22059.tar.gz |
Update recentFirst usage in tutorial 5
Closes #120
Diffstat (limited to 'web/tutorials')
-rw-r--r-- | web/tutorials/05-snapshots-feeds.markdown | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/web/tutorials/05-snapshots-feeds.markdown b/web/tutorials/05-snapshots-feeds.markdown index 230a703..a8c06c6 100644 --- a/web/tutorials/05-snapshots-feeds.markdown +++ b/web/tutorials/05-snapshots-feeds.markdown @@ -51,7 +51,7 @@ create ["atom.xml"] $ do let feedCtx = postCtx `mappend` constField "description" "This is the post description" - posts <- take 10 . recentFirst <$> loadAll "posts/*" + posts <- fmap (take 10) . recentFirst =<< loadAll "posts/*" renderAtom myFeedConfiguration feedCtx posts ``` @@ -122,6 +122,7 @@ create ["atom.xml"] $ do route idRoute compile $ do let feedCtx = postCtx `mappend` bodyField "description" - posts <- take 10 . recentFirst <$> loadAllSnapshots "posts/*" "content" + posts <- fmap (take 10) . recentFirst =<< + loadAllSnapshots "posts/*" "content" renderAtom myFeedConfiguration feedCtx posts ``` |