fix path prefix
This commit is contained in:
parent
46d009ca0d
commit
01ed1a3308
@ -69,7 +69,7 @@ main = hakyllWith config $ do
|
|||||||
match "posts/*" $ do
|
match "posts/*" $ do
|
||||||
let ctx = constField "type" "article" <> postCtx
|
let ctx = constField "type" "article" <> postCtx
|
||||||
|
|
||||||
route $ constRoute "posts/" <> metadataRoute titleRoute
|
route $ metadataRoute titleRoute `composeRoutes` (prefixRoute "posts/")
|
||||||
compile $
|
compile $
|
||||||
pandocCompilerCustom
|
pandocCompilerCustom
|
||||||
>>= loadAndApplyTemplate "templates/post.html" ctx
|
>>= loadAndApplyTemplate "templates/post.html" ctx
|
||||||
@ -240,3 +240,6 @@ fileNameFromTitle =
|
|||||||
titleRoute :: Metadata -> Routes
|
titleRoute :: Metadata -> Routes
|
||||||
titleRoute =
|
titleRoute =
|
||||||
constRoute . fileNameFromTitle
|
constRoute . fileNameFromTitle
|
||||||
|
|
||||||
|
prefixRoute :: FilePath -> Routes
|
||||||
|
prefixRoute p = customRoute $ \id -> p ++ (toFilePath id)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user