aboutsummaryrefslogtreecommitdiff
path: root/layouts/partials/scripts.html
diff options
context:
space:
mode:
authorolOwOlo <26087907+olOwOlo@users.noreply.github.com>2018-07-06 22:24:47 +0800
committerolOwOlo <26087907+olOwOlo@users.noreply.github.com>2018-07-06 22:24:47 +0800
commita3cab1a3542932c3a9ed53d5dbca7158efe3120f (patch)
tree51df94c2f7bfefd6d220567a881bd293341763a3 /layouts/partials/scripts.html
parentcec9ea91bc4218421d3bf227c301519a839cb4af (diff)
feat(mathjax): configure to let mathjax use local files
Close #63
Diffstat (limited to 'layouts/partials/scripts.html')
-rw-r--r--layouts/partials/scripts.html6
1 files changed, 5 insertions, 1 deletions
diff --git a/layouts/partials/scripts.html b/layouts/partials/scripts.html
index 1a71393..b9c9a55 100644
--- a/layouts/partials/scripts.html
+++ b/layouts/partials/scripts.html
@@ -78,7 +78,11 @@
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>
+ {{ if .Site.Params.mathjaxUseLocalFiles -}}
+ <script type="text/javascript" async src="{{ "lib/mathjax/MathJax.js?config=TeX-MML-AM_CHTML" | relURL }}"></script>
+ {{- else -}}
+ <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 }}
{{- end }}
<!-- Analytics -->