-
Notifications
You must be signed in to change notification settings - Fork 96
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
Feature Discussion: MathJax prerendering #191
Comments
I agree with the goal. Frog is a static generator.
Probably all of these should be handled consistently. |
Right, this feature sounds like another good candidate for a plugin, in particular if it depends on Node.js.
|
Oh great! I didn't notice the plugin API. I'll start looking at how I could implement this feature as a plugin. |
It is not merged yet but should be very usable if you want to have a go. Get it from the plugins branch in my Frog repository and let me know how it works for you. There is not much in the way of documentation but there are contracts for exported API bindings. See the frog-hello plugin referenced from #193 on how to get started. |
Any updates on this issue? I would love to see this become a part of frog. (Running mathjax at page view time also makes me cry) |
The plugin API instead ended up being, users can supply an (Frog supplies a few common transformations in the Regardless, it should be possible shelling out to node as @wilbowma originally outlined. I don't know if he still wants to do that, or if you do? (I don't have time now. Also I won't be able to dogfood math symbols in blog posts.) I'd be happy to take a PR adding this in |
No updates yet, and I likely won't find time for this before Jan, given my schedule. (Unless I become suddenly inspired). My current setup, automating things through make, is working well enough for my 1 blog post using mathjax. |
Have you considered KaTeX instead?
It’s used by Khan Academy.
fre. 21. apr. 2017 kl. 00.33 skrev William J. Bowman <
[email protected]>:
It feels terrible to watch 30MB of JS slowly load my otherwise static
site. Thankfully, with a little bit of nodeJS, one can prerender MathJax
and regaining a static page. I've integrated this into my own website, but
I'm thinking it would be a neat feature to add to Frog.
I'm considering the following design.
1. Require mathjax-node-page to be installed in the Frog project
directory. (see https://github.com/wilbowma/mathjax-node-page)
2. Add a configuration key to .frogrc that enables MathJax prerendering
3. When raco frog -b is run, for each HTML $FILE that contains
MathJax, run TMP=$(mktemp); cp $FILE $TMP; ./node_modules/.bin/mjpage
--fontURL="" < $TMP > $FILE
Thoughts and comments welcome.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#191>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAcLxeQbB0L6mvxgDeQGh7b3Om53uoDKks5rx90tgaJpZM4NDp_f>
.
--
--
Jens Axel Søgaard
|
I have, but my primary concern was static rendering, and I couldn't find any way to get KaTeX to statically render. |
It feels terrible to watch 30MB of JS slowly load my otherwise static site. Thankfully, with a little bit of nodeJS, one can prerender MathJax and regain a static page. I've integrated this into my own website, but I'm thinking it would be a neat feature to add to Frog.
I'm considering the following design.
mathjax-node-page
to be installed in the Frog project directory. (see https://github.com/wilbowma/mathjax-node-page).frogrc
that enables MathJax prerenderingraco frog -b
is run, for each HTML$FILE
that contains MathJax, runTMP=$(mktemp); cp $FILE $TMP; ./node_modules/.bin/mjpage --fontURL="" < $TMP > $FILE
Thoughts and comments welcome.
The text was updated successfully, but these errors were encountered: