Skip to content

Commit

Permalink
Merge pull request #378 from sboukortt/mathjax
Browse files Browse the repository at this point in the history
Update MathJax and put it in a separate partial layout that can be overridden
  • Loading branch information
xianmin committed Feb 20, 2024
2 parents baa2b23 + 203e5ca commit 05d8802
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
2 changes: 2 additions & 0 deletions layouts/partials/mathjax.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
8 changes: 1 addition & 7 deletions layouts/partials/scripts.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,7 @@

<!-- Mathjax -->
{{- if and (or .Params.mathjax (and .Site.Params.mathjax (ne .Params.mathjax false))) (or .IsPage .IsHome) }}
<script type="text/javascript">
window.MathJax = {
showProcessingMessages: false,
messageStyle: 'none'
};
</script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.4/MathJax.js?config=TeX-MML-AM_CHTML' async></script>
{{ partialCached "mathjax.html" . }}
{{- end }}
<!-- End -->

Expand Down

0 comments on commit 05d8802

Please sign in to comment.