From 8a50a5847669127add91193f792a6e2e5123461a Mon Sep 17 00:00:00 2001 From: Tony Zorman Date: Fri, 15 Nov 2024 08:43:42 +0100 Subject: [PATCH] flake: Switch to newer version of Hakyll --- flake.nix | 5 +++++ src/site.hs | 21 +-------------------- 2 files changed, 6 insertions(+), 20 deletions(-) diff --git a/flake.nix b/flake.nix index 6bd66a5..cfc8f2a 100644 --- a/flake.nix +++ b/flake.nix @@ -29,6 +29,10 @@ }) "-f html-sidenotes" { }; + hakyll = self.callCabal2nix "hakyll" (builtins.fetchGit { + url = "https://github.com/jaspervdj/hakyll"; + rev = "61b6e1a32548902eb6feedebf0c0625b61e47947"; + }) {}; }); in { # nix build @@ -44,6 +48,7 @@ p.fonttools # Compressing fonts p.brotli # Compressing fonts (p.pygments.overrideAttrs (old: { + # https://github.com/pygments/pygments/pull/2789 version = "2.18.1b"; src = fetchFromGitHub { owner = "slotThe"; diff --git a/src/site.hs b/src/site.hs index 1f8bcfe..5dc7d60 100644 --- a/src/site.hs +++ b/src/site.hs @@ -433,25 +433,6 @@ mkCleanSnapshot name item = item <$ ----------------------------------------------------------------------- -- Compilers --- | Like 'renderPandocWithTransformM', but work on an 'Item' 'Pandoc' --- instead of just a 'Pandoc'. -myRenderPandocWithTransformM - :: ReaderOptions -> WriterOptions - -> (Item Pandoc -> Compiler (Item Pandoc)) - -> Item String - -> Compiler (Item String) -myRenderPandocWithTransformM ropt wopt f i = - writePandocWith wopt <$> (f =<< readPandocWith ropt i) - --- | Like 'pandocCompilerWithTransformM', but work on an 'Item' 'Pandoc' --- instead of just a 'Pandoc'. -myPandocCompilerWithTransformM - :: ReaderOptions -> WriterOptions - -> (Item Pandoc -> Compiler (Item Pandoc)) - -> Compiler (Item String) -myPandocCompilerWithTransformM ropt wopt f = - getResourceBody >>= myRenderPandocWithTransformM ropt wopt f - myWriter :: WriterOptions myWriter = defaultHakyllWriterOptions{ writerHTMLMathMethod = KaTeX "" } @@ -469,7 +450,7 @@ pandocRssCompiler = pandocCompilerWorker pure pandocCompilerWorker :: (Item Pandoc -> Compiler (Item Pandoc)) -> Compiler (Item String) pandocCompilerWorker = - myPandocCompilerWithTransformM + pandocItemCompilerWithTransformM myReader myWriter -- Only the `title' should be

. This needs to be here so that