summaryrefslogtreecommitdiff
path: root/app/Main.hs
diff options
context:
space:
mode:
authorChris Wells <chris@mathematicaster.org>2026-02-08 12:19:55 -0600
committerChris Wells <chris@mathematicaster.org>2026-02-08 12:19:55 -0600
commit8711224f2fbec7fbf7b0633f3e35fee051e030cb (patch)
tree78b5bc4c3eca03b57353ee745006536dd4d05552 /app/Main.hs
parentbcc218171696a4830e5d3f173ce86ddb73164433 (diff)
downloadmain-8711224f2fbec7fbf7b0633f3e35fee051e030cb.tar
main-8711224f2fbec7fbf7b0633f3e35fee051e030cb.tar.gz
main-8711224f2fbec7fbf7b0633f3e35fee051e030cb.tar.bz2
main-8711224f2fbec7fbf7b0633f3e35fee051e030cb.tar.lz
main-8711224f2fbec7fbf7b0633f3e35fee051e030cb.tar.xz
main-8711224f2fbec7fbf7b0633f3e35fee051e030cb.tar.zst
main-8711224f2fbec7fbf7b0633f3e35fee051e030cb.zip
Utilities for adding assets for testing as well as nix script for
building and deploying
Diffstat (limited to 'app/Main.hs')
-rw-r--r--app/Main.hs25
1 files changed, 16 insertions, 9 deletions
diff --git a/app/Main.hs b/app/Main.hs
index 4011995..9510471 100644
--- a/app/Main.hs
+++ b/app/Main.hs
@@ -21,10 +21,14 @@ import Text.Jasmine (minify)
import WWW.Base (baseHakyll, domain, myHakyllWriterOptions, myHakyllReaderOptions)
import WWW.Templates (myContext, defaultTemplate)
+import GHC.IO.Encoding qualified as E
+
main :: IO ()
-main = baseHakyll domain $ do
+main = do
+ E.setLocaleEncoding E.utf8
+ baseHakyll domain $ do
match "templates/**" $ compile templateCompiler
-- match "data/*.bib" $ compile bibtexCompiler
match "data/papers.bib" $ compile papersCompiler
@@ -32,15 +36,18 @@ main = baseHakyll domain $ do
match "data/licenses.yaml" $ compile $ yamlCompiler @(AliasMap StrictText License_)
match "data/journals.yaml" $ compile $ yamlCompiler @(AliasMap StrictText Journal_)
- match ("www/css/*.scss" .||. "www/css/*.sass") $ do
- route $ dropParentRoute 1 `composeRoutes` setExtension "css"
- compile $ compressCss <<$>> sassCompiler
- match "www/css/*.css" $ do
- route $ dropParentRoute 1
- compile compressCssCompiler
- match "www/js/*.js" $ do
+ match "assets/**" $ do
route $ dropParentRoute 1
- compile $ minify <<$>> getResourceLBS
+ compile copyFileCompiler
+ -- match ("www/css/*.scss" .||. "www/css/*.sass") $ do
+ -- route $ dropParentRoute 1 `composeRoutes` setExtension "css"
+ -- compile $ compressCss <<$>> sassCompiler
+ -- match "www/css/*.css" $ do
+ -- route $ dropParentRoute 1
+ -- compile compressCssCompiler
+ -- match "www/js/*.js" $ do
+ -- route $ dropParentRoute 1
+ -- compile $ minify <<$>> getResourceLBS
let baseCtxt :: Context String