add: Added on-demand mathjax load to speedup performance

This commit is contained in:
Junyi Hou 2024-04-09 20:30:37 +08:00
parent 1c2abf59d0
commit 90a5c66d8b
2 changed files with 3 additions and 2 deletions

View File

@ -25,7 +25,7 @@ readNextPosts = 2
copyCodeButton = true
rssAsSocialIcon = true
locale = "en-us"
mathjax = true
math = false # true: enable mathjax globally (default is false)
toc = true
# Graphcomment support

View File

@ -20,6 +20,7 @@
<nav></nav>
{{ end }}
{{ if .Site.Params.mathjax }}{{ partial "mathjax_support.html" . }}{{ end }}
{{/* .Params is the current page config. .Site.Params is globall config in hugo.toml */}}
{{ if or .Site.Params.math .Params.math }}{{ partial "mathjax_support.html" . }}{{ end }}
{{ partial "header-extra.html" . }}