From 22f2fd0adcd9e7d169fbd75b14d4fcf67efaf020 Mon Sep 17 00:00:00 2001 From: Pagwin Date: Sat, 21 Dec 2024 21:22:35 -0500 Subject: [PATCH] updated todo list and removing infrastructure for links page --- TODO | 18 ++++++------------ app/Config.hs | 2 +- app/Main.hs | 22 ++-------------------- 3 files changed, 9 insertions(+), 33 deletions(-) diff --git a/TODO b/TODO index 0ff2463..bd7b44f 100644 --- a/TODO +++ b/TODO @@ -1,19 +1,13 @@ -Fix compile errors from setting up the groundwork for rss and section css shenanigans so I can do the rss feed now - -Clean up the - -make the date format ISO (Markdown seems fine, just need typst)? - -make typst dependant on yaml? - -add template variable(s) for what "section" we're in - -make it so typst citation section has a header and/or is a div elem instead of a section element - github action for deploy to github pages minify js and css when copying over instead of just copying +add in sass preprocessing with the cli + +make typst dependant on yaml? + +make it so typst citation section has a header and/or is a div elem instead of a section element + process source code blocks with tree sitter https://hackage.haskell.org/package/tree-sitter Check to see if pandoc html output can be changed somehow (for header anchor links) diff --git a/app/Config.hs b/app/Config.hs index 80c3ff9..17ba566 100644 --- a/app/Config.hs +++ b/app/Config.hs @@ -8,7 +8,7 @@ assetGlobs = ["static//*", "robots.txt"] -- CAN ONLY BE TYPST DOCS UNLESS YOU CHANGE THINGS AT THE `pages` RULE in `Main.hs pagePaths :: [String] -pagePaths = ["links.typ"] +pagePaths = [] postGlobs :: [String] postGlobs = ["posts/*.typ", "posts/*.md"] diff --git a/app/Main.hs b/app/Main.hs index b4bb996..6973de5 100644 --- a/app/Main.hs +++ b/app/Main.hs @@ -64,7 +64,6 @@ buildRules = do assets pages postsRule - postList rss -- make a rule of the pattern outputDir/asset_name which copes from outputDir/../pages @@ -158,7 +157,8 @@ home :: Rules () home = outputDir "index.html" %> \target -> do postPaths <- getPublishedPosts - posts <- 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' @@ -173,24 +173,6 @@ home = applyTemplateAndWrite "default.html" page target Shake.putInfo $ "Built " <> target -postList :: Rules () -postList = - outputDir "posts/index.html" %> \target -> do - postPaths <- getPublishedPosts - posts <- sortOn (Ord.Down . postDate) <$> forM postPaths readPost - let posts' = map fromPost posts - html <- applyTemplate "posts.html" $ HM.singleton "posts" posts' - time <- Utilities.now - let page = - Page - { pageTitle = T.pack "Blog Posts", - pageContent = html, - pageNow = time, - pageSection = T.pack $ fromJust $ Shake.stripExtension "html" target - } - applyTemplateAndWrite "default.html" page target - Shake.putInfo $ "Built " <> target - data Rss = Rss { now :: T.Text, posts :: [RenderedPost]