fix(compatibility): compatibility for version 0.1.X (#351)

This commit is contained in:
Dillon
2020-05-12 22:40:49 +08:00
committed by GitHub
parent 7d0603ece0
commit 7c4962e39a
4 changed files with 39 additions and 19 deletions

View File

@@ -89,8 +89,13 @@
{{- end -}}
{{- /* KaTeX */ -}}
{{- if $params.math.enable -}}
{{- $math := $params.math -}}
{{- $math := $params.math -}}
{{- if eq $math true -}}
{{- $math = .Site.Params.page.math | default dict -}}
{{- else if eq $math false -}}
{{- $math = dict "enable" false -}}
{{- end -}}
{{- if $math.enable -}}
{{- $source := $cdn.katexCSS | default "lib/katex/katex.min.css" -}}
{{- dict "source" $source "fingerprint" $fingerprint | dict "scratch" $.Scratch "data" | partial "scratch/stylesheet.html" -}}
{{- $source := $cdn.katexJS | default "lib/katex/katex.min.js" -}}