mirror of
https://git.adityakumar.xyz/hugo-theme-even.git
synced 2024-11-09 14:59:45 +00:00
refactor: configure mathjax using plain javascript
If you use `x-mathjax-config` with CSP enabled, you will need to add 'unsafe-eval' to your CSP policy.
This commit is contained in:
parent
33594c0d13
commit
28b4c8a5dd
1 changed files with 3 additions and 3 deletions
|
@ -12,14 +12,14 @@
|
||||||
<script type="text/javascript" src="{{ "dist/even.min.js?v=3.0.0" | relURL }}"></script>
|
<script type="text/javascript" src="{{ "dist/even.min.js?v=3.0.0" | relURL }}"></script>
|
||||||
|
|
||||||
{{- if and (or .Params.mathjax (and .Site.Params.mathjax (ne .Params.mathjax false))) (or .IsPage .IsHome) }}
|
{{- if and (or .Params.mathjax (and .Site.Params.mathjax (ne .Params.mathjax false))) (or .IsPage .IsHome) }}
|
||||||
<script type="text/x-mathjax-config">
|
<script type="text/javascript">
|
||||||
MathJax.Hub.Config({
|
window.MathJax = {
|
||||||
{{ if or .Params.mathjaxEnableSingleDollar (and .Site.Params.mathjaxEnableSingleDollar (ne .Params.mathjaxEnableSingleDollar false)) -}}
|
{{ if or .Params.mathjaxEnableSingleDollar (and .Site.Params.mathjaxEnableSingleDollar (ne .Params.mathjaxEnableSingleDollar false)) -}}
|
||||||
tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]},
|
tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]},
|
||||||
{{ end -}}
|
{{ end -}}
|
||||||
showProcessingMessages: false,
|
showProcessingMessages: false,
|
||||||
messageStyle: 'none'
|
messageStyle: 'none'
|
||||||
});
|
};
|
||||||
</script>
|
</script>
|
||||||
<script type="text/javascript" async src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.2/MathJax.js?config=TeX-MML-AM_CHTML"></script>
|
<script type="text/javascript" async src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.2/MathJax.js?config=TeX-MML-AM_CHTML"></script>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
Loading…
Reference in a new issue