Limit the number of posts on the front page
This commit is contained in:
parent
52f9db28ea
commit
7361faab73
1 changed files with 1 additions and 1 deletions
2
site.hs
2
site.hs
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue