Closed rrampr-zz closed 7 years ago
Hello @rrampr,
have a look at the customJS
option in the example config file. Just add the url to the MathJax script as string to list.
The aforementioned solution should work fine. Feel free to reopen this issue if the approach doesn't solve your problem.
Just want to leave this here for future people
Look in the root theme folder / layouts / js.html
There is the following lines.
{{ range .Site.Params.customJS }}
<script src="{{ $.Site.BaseURL }}{{ . }}"></script>
{{ end }}
The prefix {{ $.Site.BaseURL }}
adds the site url
to the links breaking any links to external cdn's and what not. So if you are linking to
an external cdn using the following in config.toml
customJS = ["https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.2/MathJax.js?config=TeX-MML-AM_CHTML"]
Then you need to change the lines in js.html
to
{{ range .Site.Params.customJS }}
<script src="{{ . }}"></script>
{{ end }}
Can we have mathjax support. I manually override the footer.html to do this, but it would be nice if it were inbuilt into the theme.
https://gohugo.io/tutorials/mathjax/