mirror of
https://github.com/hugo-fixit/FixIt.git
synced 2026-09-02 11:42:39 +00:00
🐛 Fix: style and script shortcodes missing values in page Scratch
This commit is contained in:
@@ -1,2 +1,5 @@
|
||||
{{- $scriptArr := (.Page.Scratch.Get "this").scriptArr | default slice -}}
|
||||
{{- $scriptArr | append (trim (partial "function/dos2unix.html" .Inner) "\n") | .Page.Scratch.SetInMap "this" "scriptArr" -}}
|
||||
{{- $scriptArr := .Page.Store.Get "scriptArr" | default slice -}}
|
||||
{{- $content := trim (partial "function/dos2unix.html" .Inner) "\n" -}}
|
||||
{{- if not (in $scriptArr $content) -}}
|
||||
{{- $scriptArr | append $content | .Page.Store.Set "scriptArr" -}}
|
||||
{{- end -}}
|
||||
|
||||
Reference in New Issue
Block a user