diff options
| author | Chris Wells <chris@mathematicaster.org> | 2026-02-08 20:34:13 -0600 |
|---|---|---|
| committer | Chris Wells <chris@mathematicaster.org> | 2026-02-08 20:34:13 -0600 |
| commit | 2df49f63b4e5095ff3fbe31d61a78302981cbe95 (patch) | |
| tree | 267e973292d313bc374913b0d855403f47ca669a /app | |
| parent | ff65b3f82a5cdb84ef528ca9265d908c55f48902 (diff) | |
| download | main-2df49f63b4e5095ff3fbe31d61a78302981cbe95.tar main-2df49f63b4e5095ff3fbe31d61a78302981cbe95.tar.gz main-2df49f63b4e5095ff3fbe31d61a78302981cbe95.tar.bz2 main-2df49f63b4e5095ff3fbe31d61a78302981cbe95.tar.lz main-2df49f63b4e5095ff3fbe31d61a78302981cbe95.tar.xz main-2df49f63b4e5095ff3fbe31d61a78302981cbe95.tar.zst main-2df49f63b4e5095ff3fbe31d61a78302981cbe95.zip | |
Making sure things compile properly
Diffstat (limited to 'app')
| -rw-r--r-- | app/Main.hs | 31 |
1 files changed, 22 insertions, 9 deletions
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) |
