m***@gmail.com
2017-04-07 14:05:28 UTC
Hi,
I'm trying to read template as a String. My goal is to pass custom
template to Pandoc' WriterOptions. Something like:
...
route "xxx" $ do
route $ setExtension "html"
compile $ do
tmpl <- loadBody "templates/tmpl.html"
pandocCompilerWith defaultHakyllReaderOptions $ myWriterOptions tmpl
myWriterOptions :: String -> WriterOptions
myWriterOptions tmpl = defaultHakyllWriterOptions {
writerTemplate = tmpl
}
Unfortunately, I've got runtime error:
[ERROR] Hakyll.Core.Compiler.Require.load: templates/revealjs.html
(snapshot _final) was found in the cache, but does not have the right type:
expected [Char] but got Template
I suppose I have to get content of the template, but I don't know how to do
it (or, maybe there is another option to load template inside Compiler
monad).
--
Regards,
Mike.
I'm trying to read template as a String. My goal is to pass custom
template to Pandoc' WriterOptions. Something like:
...
route "xxx" $ do
route $ setExtension "html"
compile $ do
tmpl <- loadBody "templates/tmpl.html"
pandocCompilerWith defaultHakyllReaderOptions $ myWriterOptions tmpl
myWriterOptions :: String -> WriterOptions
myWriterOptions tmpl = defaultHakyllWriterOptions {
writerTemplate = tmpl
}
Unfortunately, I've got runtime error:
[ERROR] Hakyll.Core.Compiler.Require.load: templates/revealjs.html
(snapshot _final) was found in the cache, but does not have the right type:
expected [Char] but got Template
I suppose I have to get content of the template, but I don't know how to do
it (or, maybe there is another option to load template inside Compiler
monad).
--
Regards,
Mike.
--
You received this message because you are subscribed to the Google Groups "hakyll" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hakyll+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups "hakyll" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hakyll+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.