Open ghost opened 6 years ago
Do you mean that you'd prefer to use pypandoc
for conversion of Markdown files to HTML prior to including into your templates? Different Markdown engines aren't supported at the moment, unfortunately, but one could perhaps hack something together using a custom template tag. Right now Statik just uses the Python-Markdown library.
Do you mean that you'd prefer to use pypandoc for conversion of Markdown files to HTML prior to including into your templates? Yes
So put it in the wishlist
I agree that an option to use pypandoc
would be a very useful feature. Among other things, pandoc's support for citations and bibliographies seems to be far superior to anything in the Python-Markdown ecosystem.
I thought I'd try to implement your suggested workaround using a custom template tag or filter, but isn't it a problem that all Content fields are automatically processed by Python-Markdown? One solution involving less development effort than integrating pandoc would be to allow disabling the builtin Markdown support so that Content fields could be processed by a custom filter.
Good idea @epatters - the best approach would be to make the Content
field processing modular. This way one could also potentially support other content formats apart from Markdown too. I'll look into doing this ASAP, along with implementing pypandoc
support.
Thanks, @thanethomson! Good point about other content formats: I'm sure there are folks in the Python community who'd want to use ReST.
@thanethomson, do you have a concrete plan for refactoring the processing of the Content
field? If it's not too involved, I might take a stab at implementing this feature myself.
Can I run pypandoc for rendering markdown in html templates? How?