Limit the number of posts on the front page

This commit is contained in:
Dimitri Lozeve 2019-04-01 18:03:09 +02:00
parent 52f9db28ea
commit 7361faab73

View file

@ -81,7 +81,7 @@ main = hakyll $ do
match "index.html" $ do
route idRoute
compile $ do
posts <- recentFirst =<< loadAll "posts/*"
posts <- fmap (take 10) $ recentFirst =<< loadAll "posts/*"
let indexCtx =
listField "posts" postCtx (return posts) `mappend`
defaultContext