feat(shortcode): add script shortcode (#359)
This commit is contained in:
@@ -2,5 +2,7 @@
|
||||
{{- $count := (.scratch.Get "this").count | default 1 -}}
|
||||
{{- $id := printf "id-%d" $count -}}
|
||||
{{- $count | add 1 | .scratch.SetInMap "this" "count" -}}
|
||||
{{- dict $id .content | dict "data" | dict "config" | merge (.scratch.Get "this") | .scratch.Set "this" -}}
|
||||
{{- with .content -}}
|
||||
{{- dict $id . | dict "data" | dict "config" | merge ($.scratch.Get "this") | $.scratch.Set "this" -}}
|
||||
{{- end -}}
|
||||
{{- return $id -}}
|
||||
|
||||
Reference in New Issue
Block a user