mirror of
http://101.35.51.105:3000/congyu/work_with_codex.git
synced 2026-04-27 22:30:50 +08:00
remove fancy routes
This commit is contained in:
+1
-11
@@ -9,16 +9,6 @@ import Hakyll
|
|||||||
import System.FilePath
|
import System.FilePath
|
||||||
import Text.Pandoc
|
import Text.Pandoc
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
-- https://www.rohanjain.in/hakyll-clean-urls/
|
|
||||||
cleanRoute :: Routes
|
|
||||||
cleanRoute = customRoute createIndexRoute
|
|
||||||
where
|
|
||||||
createIndexRoute ident = takeDirectory p </> takeBaseName p </> "index.html"
|
|
||||||
where
|
|
||||||
p = toFilePath ident
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
config :: Configuration
|
config :: Configuration
|
||||||
config =
|
config =
|
||||||
defaultConfiguration
|
defaultConfiguration
|
||||||
@@ -52,7 +42,7 @@ main = hakyllWith config $ do
|
|||||||
compile compressCssCompiler
|
compile compressCssCompiler
|
||||||
|
|
||||||
match "notes/*" $ do
|
match "notes/*" $ do
|
||||||
route cleanRoute
|
route $ setExtension "html"
|
||||||
compile $ do
|
compile $ do
|
||||||
tocCtx <- getTocCtx defaultContext
|
tocCtx <- getTocCtx defaultContext
|
||||||
chaoDocCompiler
|
chaoDocCompiler
|
||||||
|
|||||||
Reference in New Issue
Block a user