match "posts/*" $ do
route $ setExtension "html"
compile $ pandocCompiler_
>>= loadAndApplyTemplate "templates/post.html" postCtx
>>= loadAndApplyTemplate "templates/default.html" postCtx
>>= relativizeUrls
match "generated/" $ do
route generatedRoute
compile copyFileCompiler
match "posts/*" $ do
route $ setExtension "html"
compile $ pandocCompiler_
>>= saveSnapshot "compiledPosts"
>>= loadAndApplyTemplate "templates/post.html" postCtx
>>= loadAndApplyTemplate "templates/default.html" postCtx
>>= relativizeUrls
match "generated/" $ do
route generatedRoute
compile (loadAllSnapshots "posts/" "compiledPosts") >> copyFileCompiler
which should ensure that the posts get compiled (and hence, the "generated/" directory gets populated) before hakyll checks the folder for items, but I get an error
Any idea on how to ensure that the posts are compiled before the generated content is routed elsewhere? Regards, Laurent | |