diff options
| author | Chris Wells <chris@mathematicaster.org> | 2025-03-25 17:31:18 -0500 |
|---|---|---|
| committer | Chris Wells <chris@mathematicaster.org> | 2025-03-25 17:31:18 -0500 |
| commit | f902be4f4641262787c623deac267c02d89fec7c (patch) | |
| tree | 0252b58eb2600c28c53187633f0b80348daf9614 /app/Main.hs | |
| parent | e2a0c8d336f2644218573bdec0f83cd675944c5f (diff) | |
| download | main-f902be4f4641262787c623deac267c02d89fec7c.tar main-f902be4f4641262787c623deac267c02d89fec7c.tar.gz main-f902be4f4641262787c623deac267c02d89fec7c.tar.bz2 main-f902be4f4641262787c623deac267c02d89fec7c.tar.lz main-f902be4f4641262787c623deac267c02d89fec7c.tar.xz main-f902be4f4641262787c623deac267c02d89fec7c.tar.zst main-f902be4f4641262787c623deac267c02d89fec7c.zip | |
Working more on my publication list
Diffstat (limited to 'app/Main.hs')
| -rw-r--r-- | app/Main.hs | 31 |
1 files changed, 23 insertions, 8 deletions
diff --git a/app/Main.hs b/app/Main.hs index 1e935e8..6e00f0a 100644 --- a/app/Main.hs +++ b/app/Main.hs @@ -20,21 +20,36 @@ import WWW.Templates (myContext, defaultTemplate) main :: IO () main = baseHakyll domain $ do match "templates/**" $ compile templateCompiler - match "data/*.bib" $ compile bibtexCompiler + -- match "data/*.bib" $ compile bibtexCompiler + match "data/papers.bib" $ compile papersCompiler 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 - , personCtxt @StrictText <$> loadBody "data/people.yaml" - , licenseCtxt @StrictText <$> loadBody "data/licenses.yaml" - , journalCtxt @StrictText <$> loadBody "data/journals.yaml" + let baseCtxt :: Context String + baseCtxt = fold $ + [ myContext + , personCtxt "data/people.yaml" + , licenseCtxt "data/licenses.yaml" + , journalCtxt "data/journals.yaml" ] + -- let baseCtxt :: Compiler (Context String) + -- baseCtxt = fold <$> sequence + -- [ pure myContext + -- , personCtxt @StrictText <$> loadBody "data/people.yaml" + -- , 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 + papers <- loadBody @[Paper String] "data/papers.bib" + let fixedPapers = sort $ papers <&> \p -> p + { authors = (`filter` authors p) $ flip notElem + [ Name "Cox" "Christopher" Nothing + , Name "Wells" "Chris" Nothing + ] -- Remove me from the author list + } + undefined >>= applyTemplate defaultTemplate baseCtxt >>= applyAsTemplate (mkPaperContext fixedPapers) match "www/teaching/index.md" $ do route $ dropParentRoute 1 `composeRoutes` setExtension ".html" compile $ myPandocCompiler >>= applyTemplate defaultTemplate baseCtxt |
