summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/Main.hs31
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)