Does Franklin support Pandoc and MathJax
nandac opened this issue · 4 comments
Hi,
I currently have a site that uses the Pelican static site generator which uses Python and I am looking for something written in Julia as I have issues with page rendering speed during local development.
Currently, it takes 10 to 20 seconds to render 20 markdown pages which is very slow, and think Julia will be way faster.
I also love the instant rendering feature that Franklin has.
My question is does Franklin support Pandoc?
Pelican does not support Pandoc either so I wrote a custom plugin to add this support available here.
Would it be possible to contribute a plugin that will allow us to change the rendering engine?
The other question I have is if I can use MathJax with Fraklin for math instead of KaTeX?
I look forward to your reply.
Many thanks.
Hello,
If you're fully new to Franklin and willing to invest efforts in writing code for plugins, I'd suggest you start directly with Xranklin, which is a rewrite of Franklin and intended to be the next version of Franklin (though it's been a long time coming).
In terms of MathJax you can already use with Franklin. Same with Xranklin.Have a look at the demos folder, mathjax file.
In terms of pandoc, we're moving further away, but nothing prevents you from executing your own processor (pandoc or otherwise). It's just a case of passing it the input and retrieving the output via a hfun. It will require a bit of finicky work but nothing very hard. Primarily pandoc likely generates full HTML and you'd have to strip that away so you only inject the actual HTML body (maybe there's an option in pandoc that lets you generate that directly).
Summary = have a look at Xranklin, both MathJax and Pandoc can be used, first one is easy, second one a bit less, but both doable without changes to the code base.
@tlienart Thank you for your prompt reply.
I will certainly take a look at Xranklin and see how I can contribute. I only just started on Julia so still learning the ropes. :-)
Thanks for pointing me to the MathJax support demo.
If I may point out some of the equations are not rendering correctly. I think it may be just a simple syntax issue as the other Math renders without issue.
I'm not sure to what rendering you're referring to. GitHub processes math as well but badly, this is likely what you saw.
If you run the demos locally you'll see that the math is rendered perfectly.
The demos used to be live but I broke something recently in the deployment that I haven't had the time to fix.