✨ Use store method impl the music etc shortcode.
This commit is contained in:
17
layouts/partials/head/script/plugins.html
Normal file
17
layouts/partials/head/script/plugins.html
Normal 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 }}
|
||||
Reference in New Issue
Block a user