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

Fixing MathJax rendering #399

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

danielphil
Copy link

@danielphil danielphil commented Nov 1, 2020

This is a bug fix.

Summary

MathJax isn't rendering properly on the sample page or on my blog. I think this may be related to a Kramdown update on Github pages that's causing the problem.

It looks like there's a workaround in scripts.html that's no longer required, so I've just removed this.

I've tested this locally on the example pages and it fixes the rendering problem.

Context

I think this is also related to #388.

@danielphil danielphil changed the title Fixing MathJax rendering. Fixing MathJax rendering Nov 1, 2020
@mmistakes
Copy link
Owner

mmistakes commented Nov 2, 2020

Looks to me this broke MathJax rendering with Jekyll 4. That's probably what the original fix was for perhaps. I'm not close enough to MathJax to know what the path forward is, but seems to me the version of Kramdown used on GitHub Pages and current Jekyll 4.x are different and whatever "fix" there is needs to support both.

It actually looks worse off than the GitHub pages version as all of the math equations are removed instead of not rendering like before.

Screen Shot 2020-11-02 at 9 45 14 AM

@danielphil
Copy link
Author

Oh! That's not good! I followed the development instructions to get a preview locally (looking at http://127.0.0.1:4000/example/2015/08/10/mathjax-example.html) and everything looked fine when I tested it there, but I might have missed something. I've tried a completely clean repo and repeating the test steps again and it's still rendering the equations for me.

I'm not very familiar with Ruby so I might be doing something wrong here, but my Gemfile.lock has jekyll (4.1.1), so I think I'm running with Jekyll 4? How're you setting up your test environment?

@mmistakes
Copy link
Owner

Sounds like you previewed it locally the same way I did. When I cd into the /example/ folder and run bundle update it updated my version of Jekyll to the same one you're using 4.1.1. Previously I was at 4.0 which must have been the issue.

Now I'm seeing the math equations in the sample post as expected. Going to do some more testing before merging this in, but I think we're good now. As long as it works with the GitHub Pages flavor of Jekyll and latest I'm cool.

@danielphil
Copy link
Author

Sounds good! Let me know if there's anything I can do to help with testing or if you run into any problems. Thanks for the fantastic theme!

@indradhanush
Copy link

Hi @mmistakes! I just spotted the same issue on my blog and am on jekyll 3.9.3. Any suggestions on how to fix it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants