Welcome to mirror list, hosted at ThFree Co, Russian Federation.

id.html « function « partials « layouts - github.com/dillonzq/LoveIt.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: cff12fcc3a4bd17a0038779bbe84e46400d14126 (plain)
1
2
3
4
5
6
{{- /* ID */ -}}
{{- $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" -}}
{{- return $id -}}