From a80c5f10bcf66410b5c3bb76ebe385583868d53b Mon Sep 17 00:00:00 2001 From: Pagwin Date: Sat, 26 Oct 2024 21:31:14 -0400 Subject: [PATCH] made post list build target use the default template instead of just doing the post list --- app/Main.hs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/Main.hs b/app/Main.hs index 3db3b73..40567ab 100755 --- a/app/Main.hs +++ b/app/Main.hs @@ -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 =