mirror of https://github.com/jpanther/congo.git
🐛 Fix JSON output duplicated items
parent
1672e2e501
commit
e9ce1e3214
|
@ -1,6 +1,6 @@
|
|||
{{- $.Scratch.Add "index" slice -}}
|
||||
{{- $index := slice -}}
|
||||
{{- range .Site.RegularPages -}}
|
||||
{{ $section := .Site.GetPage "section" .Section }}
|
||||
{{- $.Scratch.Add "index" (dict "date" (.Date | time.Format (.Site.Language.Params.dateFormat | default ":date_long")) "title" .Title "section" $section.Title "summary" .Summary "content" (.Plain | safeJS) "permalink" .Permalink) -}}
|
||||
{{- $index = $index | append (dict "date" (.Date | time.Format (.Site.Language.Params.dateFormat | default ":date_long")) "title" .Title "section" $section.Title "summary" .Summary "content" (.Plain | safeJS) "permalink" .RelPermalink) -}}
|
||||
{{- end -}}
|
||||
{{- $.Scratch.Get "index" | jsonify -}}
|
||||
{{- $index | jsonify -}}
|
||||
|
|
Loading…
Reference in New Issue