mirror of
https://github.com/hugo-fixit/FixIt.git
synced 2026-09-02 11:42:39 +00:00
b974fa56df
Closes #215 Closes #243
30 lines
881 B
HTML
30 lines
881 B
HTML
{{- /* FixIt theme patches */ -}}
|
|
{{- $params := .Scratch.Get "params" -}}
|
|
|
|
{{- /* Toc data patch */ -}}
|
|
{{- $toc := $params.toc -}}
|
|
{{- if eq $toc true -}}
|
|
{{- $toc = dict "enable" true | merge .Site.Params.page.toc -}}
|
|
{{- else if eq $toc false -}}
|
|
{{- $toc = dict "enable" false -}}
|
|
{{- end -}}
|
|
{{- .Scratch.Set "toc" $toc -}}
|
|
|
|
{{- /* Reward data patch */ -}}
|
|
{{- $reward := $params.reward -}}
|
|
{{- if eq $reward true -}}
|
|
{{- $reward = dict "enable" true | merge .Site.Params.page.reward -}}
|
|
{{- else if eq $reward false -}}
|
|
{{- $reward = dict "enable" false -}}
|
|
{{- end -}}
|
|
{{- .Scratch.Set "reward" $reward -}}
|
|
|
|
{{- /* KaTeX data patch */ -}}
|
|
{{- $math := $params.math -}}
|
|
{{- if eq $math true -}}
|
|
{{- $math = .Site.Params.page.math | default dict -}}
|
|
{{- else if eq $math false -}}
|
|
{{- $math = dict "enable" false -}}
|
|
{{- end -}}
|
|
{{- .Scratch.Set "math" $math -}}
|