Files
FixIt/layouts/_partials/init/patch.html
T
Cell 0ce74d82f8 ♻️ Refactor: mathematical formula render (#609)
*  Feat: add support for math passthrough render hook

*  Feat: enable copy-tex extension for KaTeX server-side render

*  Feat: enhance mathematical rendering support with KaTeX and MathJax configurations

*  Feat: add KaTeX error handling and custom macros map config

*  Feat: add MathJax client-side rendering as an alternative math engine

*  Feat: update MathJax CDN configuration and enhance asset loading parameters

* 🔥 Feat: remove unused KaTeX math rendering scripts and update KaTex

*  Feat: make \KaTeX command work in MathJax

*  Feat: update KaTeX CDN links for Twikoo integration

*  Perf: Math in content encryption

* 🐛 Fix: update class name from 'fi-row' to 'fi-raw' in raw.html shortcode

* 🐛 Fix: correct MathJax math delimiters in load-mathjax.js

*  Feat: enhance MathJax configuration with additional tex parameters and update asset handling

* 🐛 Fix: adjust KaTeX display overflow behavior
2025-06-30 12:58:48 +08:00

39 lines
1.2 KiB
HTML

{{- /* FixIt theme patches */ -}}
{{- $params := partial "function/params.html" -}}
{{- /* Toc data patch */ -}}
{{- $toc := $params.toc -}}
{{- if not (reflect.IsMap $toc) -}}
{{- $toc = dict "enable" $toc | merge .Site.Params.page.toc -}}
{{- 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 = dict "enable" true | merge .Site.Params.page.math -}}
{{- else if eq $math false -}}
{{- $math = dict "enable" false -}}
{{- end -}}
{{- .Store.Set "math" $math -}}
{{- /* SiteTime config patch */ -}}
{{- $siteTime := dict "Animate" true "Icon" "fa-solid fa-heartbeat" -}}
{{- with .Site.Params.footer.siteTime -}}
{{- if reflect.IsMap . -}}
{{- $siteTime = . -}}
{{- else -}}
{{- $siteTime = dict "enable" true "value" . | merge $siteTime -}}
{{- end -}}
{{- end -}}
{{- .Scratch.Set "siteTime" $siteTime -}}