made post list build target use the default template instead of just doing the post list

This commit is contained in:
Pagwin 2024-10-26 21:31:14 -04:00
parent 2ed5eda5e2
commit a80c5f10bc
No known key found for this signature in database
GPG key ID: 81137023740CA260

View file

@ -149,7 +149,10 @@ postList =
outputDir </> "posts/index.html" %> \target -> do
postPaths <- Shake.getDirectoryFiles "" postGlobs
posts <- sortOn (Ord.Down . postDate) <$> forM postPaths readPost
applyTemplateAndWrite "posts.html" (HM.singleton "posts" posts) target
html <- applyTemplate "posts.html" $ HM.singleton "posts" posts
let page = Page (T.pack "Blog Posts") html
applyTemplateAndWrite "default.html" page target
Shake.putInfo $ "Built " <> target
rss :: Rules ()
rss =