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