Using the skeleton website generated by hakyll-init site_foo
, I want to translate site_foo/index.html
into markdown and still keep its contents.
In other words, have a site_foo/index.markdown
that refers to the posts-list
template.
I do not know which functions one would combine to achieve the correct Compiler
for match "index.markdown"
Assuming you've already created your
index.markdown
file to replaceindex.html
you can changesite.hs
to look like:The new line is the 3rd one,
>>= return . renderPandoc
.The Pandoc compiler will render your HTML-based templates fine, however you may need to remove indentation from the HTML-based templates so Pandoc doesn't confuse the templates as code blocks.
I've used and tested this solution, but all credit for identifying the solutions is due to Jasper's answer in the Hakyll forums: https://groups.google.com/forum/#!topic/hakyll/ooMEwuiQZ24