This commit is contained in:
2025-12-22 14:02:48 +08:00
parent d77a09bdaa
commit 3131304d58
11 changed files with 46 additions and 37 deletions

View File

@@ -30,6 +30,8 @@ cleanIndexHtmls = return . fmap (replaceAll pattern replacement)
replacement::String->String = const "/"
--------------------------------------------------------------------------------
root:: String
root = ""
main :: IO ()
main = hakyll $ do
@@ -37,13 +39,13 @@ main = hakyll $ do
route idRoute
compile copyFileCompiler
match "mathjax/**" $ do
route idRoute
compile copyFileCompiler
-- match "mathjax/**" $ do
-- route idRoute
-- compile copyFileCompiler
match "mathjax-fira-font/**" $ do
route idRoute
compile copyFileCompiler
-- match "mathjax-fira-font/**" $ do
-- route idRoute
-- compile copyFileCompiler
match "fonts/*" $ do
route idRoute
@@ -61,7 +63,7 @@ main = hakyll $ do
route $ setExtension "html"
compile $
chaoDocCompiler
>>= loadAndApplyTemplate "templates/index.html" defaultContext
>>= loadAndApplyTemplate "templates/index.html" (defaultContext `mappend` constField "root" root)
>>= relativizeUrls
>>= cleanIndexHtmls
@@ -69,7 +71,7 @@ main = hakyll $ do
route cleanRoute
compile $
chaoDocCompiler
>>= loadAndApplyTemplate "templates/standalone.html" defaultContext
>>= loadAndApplyTemplate "templates/standalone.html" (defaultContext `mappend` constField "root" root)
>>= relativizeUrls
-- -- build up tags