fix(katex): fall back to cdn when neither base or css is set

This commit is contained in:
Xin
2025-08-14 17:10:49 +08:00
committed by GitHub
parent 8025de9d9d
commit 4d861d7175

View File

@@ -18,9 +18,13 @@
*/ -}}
{{- $noop := .WordCount -}}
{{- $katexBase := "https://cdn.jsdelivr.net/npm/katex@latest/dist" -}}
{{- $katexBase := "" -}}
{{- with site.Params.math.katex.base -}}
{{- $katexBase = . -}}
{{- else -}}
{{- if not site.Params.math.katex.css -}}
{{- $katexBase = "https://cdn.jsdelivr.net/npm/katex@latest/dist" -}}
{{- end -}}
{{- end -}}
{{- $katexCssAsset := "" -}}