Integrating MathJax to Ghost

If you are using mathematical functions, MathJax is the first joice.

To integrate it with ghost, simply open up ghost/content/themes/YOUR_THEME_NAME/default.hbs
And insert the following before the </body> tag:

{{! Mathjax configuration}}
<script type="text/javascript" src=""></script>
<script type="text/x-mathjax-config">
tex2jax: {inlineMath: [[','], ['\(','\)']]}

And now if you create a new post and add something like $\sum \frac{1}{n} = H_n$ it should look like this: $\sum \frac{1}{n} = H_n$

A little hint: you have to escape underscores in your function to get it working properly!(_ instead of _) like in $\sum_{n=1}^\infty \frac{1}{n} = H_n$ => $\sum_{n=1}^\infty \frac{1}{n} = H_n$

Integrating MathJax to Ghost
Share this

Subscribe to robsCode