have home have a full list of posts

This commit is contained in:
Pagwin 2024-12-18 01:09:07 -05:00
parent 11f0f80daf
commit 189e8e09e6
No known key found for this signature in database
GPG key ID: 81137023740CA260

View file

@ -158,9 +158,7 @@ home :: Rules ()
home =
outputDir </> "index.html" %> \target -> do
postPaths <- getPublishedPosts
posts <-
take 3
. sortOn (Ord.Down . postDate)
posts <- sortOn (Ord.Down . postDate)
<$> forM postPaths readPost
let posts' = map fromPost posts
html <- applyTemplate "home.html" $ HM.singleton "posts" posts'