Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/xiaoheiAh/hugo-theme-pure.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUdit <23015406+udit-001@users.noreply.github.com>2019-11-21 12:33:24 +0300
committerZhao XiaoHei <xiaohei.zyx@gmail.com>2019-11-21 16:00:20 +0300
commitf496507d049a74aafe1511f3aaad1187a4e5bb07 (patch)
tree96943caa00cae01c9e4d3d69f607397beae86c7f /layouts
parent6d2dd1cdd29b0aa4848e04a54bfe439146230790 (diff)
Makes mathjax optional with global param.
Diffstat (limited to 'layouts')
-rw-r--r--layouts/partials/script.html12
1 files changed, 3 insertions, 9 deletions
diff --git a/layouts/partials/script.html b/layouts/partials/script.html
index 6d1b164..2367838 100644
--- a/layouts/partials/script.html
+++ b/layouts/partials/script.html
@@ -1,12 +1,6 @@
-<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.2/MathJax.js?config=TeX-MML-AM_SVG"></script>
-<script type="text/x-mathjax-config">
- MathJax.Hub.Config({
- showMathMenu: false, //disables context menu
- tex2jax: {
- inlineMath: [ ['$','$'], ['\\(','\\)'] ]
- }
- });
-</script>
+{{ if or .Params.math .Site.Params.math }}
+{{ partial "math.html" . }}
+{{ end }}
<script src="https://cdn.jsdelivr.net/npm/jquery@3.4.1/dist/jquery.min.js"></script>
<script>
window.jQuery || document.write('<script src="js/jquery.min.js"><\/script>')