hextra/layouts/partials/scripts.html
Xin c2286c9dd1
refactor: modularize scripts partial into separate components (#587)
* refactor: modularize scripts partial into separate components

* fix: conditionally load Mermaid and KaTeX scripts
2025-02-26 08:39:26 +00:00

17 lines
463 B
HTML

{{/* Core scripts (theme, menu, tabs, etc.) */}}
{{- partial "scripts/core.html" . -}}
{{/* Search */}}
{{- partial "scripts/search.html" . -}}
{{/* Mermaid */}}
{{/* FIXME: need to investigate .Page.Store hasMermaid is set for homepage */}}
{{- if and (.Page.Store.Get "hasMermaid") (not .Page.IsHome) -}}
{{- partial "scripts/mermaid.html" . -}}
{{- end -}}
{{/* KaTex */}}
{{- if .Page.Params.math -}}
{{- partial "scripts/katex.html" . -}}
{{- end -}}