Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does Franklin support Pandoc and MathJax #1067

Closed
nandac opened this issue Dec 2, 2023 · 4 comments
Closed

Does Franklin support Pandoc and MathJax #1067

nandac opened this issue Dec 2, 2023 · 4 comments

Comments

@nandac
Copy link

nandac commented Dec 2, 2023

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.

@tlienart
Copy link
Owner

tlienart commented Dec 2, 2023

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.

@nandac
Copy link
Author

nandac commented Dec 2, 2023

@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.

@tlienart
Copy link
Owner

tlienart commented Dec 2, 2023

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.

@nandac
Copy link
Author

nandac commented Dec 2, 2023

Yes @tlienart I was viewing them on GitHub.

I will connect with you on the Xrankllin project in once I get a spare moment to work on Pandoc support.

@nandac nandac closed this as completed Dec 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants