diff --git a/assets/js/mathjax.js b/assets/js/mathjax.js new file mode 100644 index 0000000..c5e15d5 --- /dev/null +++ b/assets/js/mathjax.js @@ -0,0 +1,15 @@ +document.addEventListener('DOMContentLoaded', () => { + MathJax = { + tex: { + inlineMath: [ + ['$', '$'], + ['\\(', '\\)'] + ], + displayMath: [ + ['$$', '$$'], + ['\\[', '\\]'] + ], + tags: 'ams' + } + }; +}); \ No newline at end of file diff --git a/layouts/partials/js-selector.html b/layouts/partials/js-selector.html index 847f1ea..b86ba9a 100644 --- a/layouts/partials/js-selector.html +++ b/layouts/partials/js-selector.html @@ -85,11 +85,10 @@ {{ if .Params.math }} - {{ $mathjaxConfig := resources.Get "js/data/mathjax.js" | minify | fingerprint }} - + {{ $mathjaxConfig := resources.Get "js/mathjax.js" | minify | fingerprint }} + - {{ $mathjax := (index site.Data.origin site.Params.cdn).mathjax.js }} - + {{ end }}