Skip to content

Commit 0b76d9a

Browse files
committed
Load MathJax only on pages with usemathjax flag
In order to load MathJax in a page, the page header (section with the post information, ie. title, authors, etc) should contain the flag `usemathjax: true`.
1 parent 08fc4cd commit 0b76d9a

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

_includes/head/custom.html

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
<meta name="msapplication-TileColor" content="#da532c">
88
<meta name="msapplication-config" content="/assets/images/browserconfig.xml">
99
<meta name="theme-color" content="#ffffff">
10-
<script type="text/javascript" id="MathJax-script" async
11-
src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js">
12-
</script>
10+
11+
<!-- Load MathJax only in the pages with `usemathjax: true` -->
12+
{% if page.usemathjax %}
13+
<script type="text/javascript" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js"></script>
14+
{% endif %}

0 commit comments

Comments
 (0)