summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorChris Wells <chris@mathematicaster.org>2025-02-27 10:49:54 -0600
committerChris Wells <chris@mathematicaster.org>2025-02-27 10:49:54 -0600
commit0fd0b322a504d31c54153fdefc7588ce0d4953b5 (patch)
tree312b0dc7ca38d78d969bae0e482caafa05a813ee /app
parented300e0b45bb46adec77b85474544f8908445a14 (diff)
downloadmain-0fd0b322a504d31c54153fdefc7588ce0d4953b5.tar
main-0fd0b322a504d31c54153fdefc7588ce0d4953b5.tar.gz
main-0fd0b322a504d31c54153fdefc7588ce0d4953b5.tar.bz2
main-0fd0b322a504d31c54153fdefc7588ce0d4953b5.tar.lz
main-0fd0b322a504d31c54153fdefc7588ce0d4953b5.tar.xz
main-0fd0b322a504d31c54153fdefc7588ce0d4953b5.tar.zst
main-0fd0b322a504d31c54153fdefc7588ce0d4953b5.zip
Adding pages
Diffstat (limited to 'app')
-rw-r--r--app/Main.hs20
1 files changed, 16 insertions, 4 deletions
diff --git a/app/Main.hs b/app/Main.hs
index f739cae..1e935e8 100644
--- a/app/Main.hs
+++ b/app/Main.hs
@@ -4,6 +4,7 @@ import Prolog
import Hakyll
import Hakyll.Alias
+import Hakyll.Util
import Data.Alias (AliasMap)
import Data.Name (Name_)
import Data.Person (Person_)
@@ -12,7 +13,7 @@ import Data.License (License_)
import Hakyll.Aeson (yamlCompiler)
import Hakyll.TeX.BibTeX (bibtexCompiler)
import WWW.Base (baseHakyll, domain)
-import WWW.Templates (myContext)
+import WWW.Templates (myContext, defaultTemplate)
@@ -20,9 +21,9 @@ main :: IO ()
main = baseHakyll domain $ do
match "templates/**" $ compile templateCompiler
match "data/*.bib" $ compile bibtexCompiler
- -- match "data/people.yaml" $ compile $ yamlCompiler @(AliasMap Name_ Person_)
- -- match "data/licenses.yaml" $ compile $ yamlCompiler @(AliasMap StrictText License_)
- -- match "data/journals.yaml" $ compile $ yamlCompiler @(AliasMap StrictText Journal_)
+ match "data/people.yaml" $ compile $ yamlCompiler @(AliasMap Name_ Person_)
+ match "data/licenses.yaml" $ compile $ yamlCompiler @(AliasMap StrictText License_)
+ match "data/journals.yaml" $ compile $ yamlCompiler @(AliasMap StrictText Journal_)
let baseCtxt :: Compiler (Context String)
baseCtxt = fold <$> sequence
[ pure myContext
@@ -30,4 +31,15 @@ main = baseHakyll domain $ do
, licenseCtxt @StrictText <$> loadBody "data/licenses.yaml"
, journalCtxt @StrictText <$> loadBody "data/journals.yaml"
]
+ match "www/research/index.html" $ do
+ route $ dropParentRoute 1
+ compile $ do
+ papers <- undefined
+ match "www/teaching/index.md" $ do
+ route $ dropParentRoute 1 `composeRoutes` setExtension ".html"
+ compile $ myPandocCompiler >>= applyTemplate defaultTemplate baseCtxt
pure ()
+
+
+myPandocCompiler :: Compiler (Item String)
+myPandocCompiler = pandocCompilerWith myHakyllReaderOptions myHakyllWriterOptions