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

If mathjax used, it can't be displayed in index page. #128

Open
eMous opened this issue Apr 2, 2019 · 0 comments
Open

If mathjax used, it can't be displayed in index page. #128

eMous opened this issue Apr 2, 2019 · 0 comments

Comments

@eMous
Copy link

eMous commented Apr 2, 2019

In your head.html page:

  {% if page.mathjax %}
  <script type="text/x-mathjax-config">
    MathJax.Hub.Config({
    tex2jax: { inlineMath: [["$","$"],["\\(","\\)"]] },
    "HTML-CSS": {
      linebreaks: { automatic: true, width: "container" }
    }
});
</script>

But in index.html, it can not expose an variable which is dynamically decided by the post pages to the page head.html which it include.

Inserting an if statment to index.html to parse the posts' excerpts may help.
OR
Record to site.data files when each post needs mathjax.
OR
In any case, inject the javascript statment of mathjax.

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

1 participant