mirror of
https://git.adityakumar.xyz/hugo-theme-even.git
synced 2024-11-08 22:49:44 +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>
|
||||
|
||||
{{- if and (or .Params.mathjax (and .Site.Params.mathjax (ne .Params.mathjax false))) (or .IsPage .IsHome) }}
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
<script type="text/javascript">
|
||||
window.MathJax = {
|
||||
{{ if or .Params.mathjaxEnableSingleDollar (and .Site.Params.mathjaxEnableSingleDollar (ne .Params.mathjaxEnableSingleDollar false)) -}}
|
||||
tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]},
|
||||
{{ end -}}
|
||||
showProcessingMessages: false,
|
||||
messageStyle: 'none'
|
||||
});
|
||||
};
|
||||
</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 }}
|
||||
|
|
Loading…
Reference in a new issue