mirror of
https://github.com/TrezOne/congo-hindi-gujarati.git
synced 2026-07-18 08:48:26 -04:00
🐛 Fix JSON output duplicated items
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
{{- $.Scratch.Add "index" slice -}}
|
{{- $index := slice -}}
|
||||||
{{- range .Site.RegularPages -}}
|
{{- range .Site.RegularPages -}}
|
||||||
{{ $section := .Site.GetPage "section" .Section }}
|
{{ $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 -}}
|
{{- end -}}
|
||||||
{{- $.Scratch.Get "index" | jsonify -}}
|
{{- $index | jsonify -}}
|
||||||
|
|||||||
Reference in New Issue
Block a user