From 2df49f63b4e5095ff3fbe31d61a78302981cbe95 Mon Sep 17 00:00:00 2001 From: Chris Wells Date: Sun, 8 Feb 2026 20:34:13 -0600 Subject: Making sure things compile properly --- app/Main.hs | 31 ++++++++++++++++++++++--------- 1 file changed, 22 insertions(+), 9 deletions(-) (limited to 'app/Main.hs') diff --git a/app/Main.hs b/app/Main.hs index bce890b..ec508d4 100644 --- a/app/Main.hs +++ b/app/Main.hs @@ -36,6 +36,9 @@ main = do match "data/licenses.yaml" $ compile $ yamlCompiler @(AliasMap StrictText License_) match "data/journals.yaml" $ compile $ yamlCompiler @(AliasMap StrictText Journal_) + -- load any snippets + match "**/_*.html" $ compile getResourceBody + match "assets/**" $ do route $ dropParentRoute 1 compile copyFileCompiler @@ -83,6 +86,7 @@ main = do ] -- Remove me from the author list } getResourceBody >>= applyAsTemplate (mkPaperContext (personCtxt "data/people.yaml" <> journalCtxt "data/journals.yaml") fixedPapers) >>= applyTemplate defaultTemplate baseCtxt + match "www/teaching/index.md" $ do route $ dropParentRoute 1 `composeRoutes` setExtension ".html" -- compile $ myPandocCompiler >>= applyAsTemplate baseCtxt >>= applyTemplate defaultTemplate baseCtxt @@ -92,18 +96,27 @@ main = do route $ dropParentRoute 1 `composeRoutes` setExtension ".html" compile $ getResourceBody >>= applyAsTemplate baseCtxt >>= myRenderPandoc >>= applyTemplate defaultTemplate baseCtxt - match "www/contact/*.html" $ do - route $ dropParentRoute 1 - compile $ getResourceBody >>= applyAsTemplate baseCtxt >>= applyTemplate defaultTemplate baseCtxt + -- match "www/contact/*.html" $ do + -- route $ dropParentRoute 1 + -- compile $ getResourceBody >>= applyAsTemplate baseCtxt >>= applyTemplate defaultTemplate baseCtxt + -- + -- match "www/code/*.html" $ do + -- route $ dropParentRoute 1 + -- compile $ getResourceBody >>= applyAsTemplate baseCtxt >>= applyTemplate defaultTemplate baseCtxt + -- + -- match "www/credits/*.html" $ do + -- route $ dropParentRoute 1 + -- compile $ myPandocCompiler >>= applyTemplate defaultTemplate baseCtxt - match "www/code/*.html" $ do + -- compile any other html + match "www/**/*.html" $ do route $ dropParentRoute 1 - compile $ getResourceBody >>= applyAsTemplate baseCtxt >>= applyTemplate defaultTemplate baseCtxt + compile $ getResourceBody >>= applyTemplate defaultTemplate baseCtxt - match "www/credits/*.html" $ do - route $ dropParentRoute 1 - compile $ myPandocCompiler >>= applyTemplate defaultTemplate baseCtxt - pure () + -- just copy anything else hanging around + match "www/**" $ do + route idRoute + compile copyFileCompiler myPandocCompiler :: Compiler (Item String) -- cgit v1.2.3