Use store method impl the music etc shortcode.

This commit is contained in:
elkan1788
2025-01-15 21:42:22 +08:00
parent 088da43913
commit b2e0be5a6a
16 changed files with 70 additions and 32 deletions

View File

@@ -0,0 +1,17 @@
{{/* Defind loading plugin scripts which only need in pages */}}
{{ if .IsPage }}
{{/** Short code params **/}}
{{ $scParam := .Store.Get "scParams" }}
{{/** Append math render action **/}}
{{ if or .Params.math .Site.Params.math }}
{{ partial "_funs/get_plugin.html" (dict "ctx" . "class" "others" "plugin" "math.js") }}
{{ end }}
{{/** Append mermaid render action **/}}
{{ if $scParam.mermaid }}
{{ partial "_funs/get_plugin.html" (dict "ctx" . "class" "others" "plugin" "mermaid.js") }}
{{ end }}
{{ end }}