diff --git a/layouts/_default/index.json b/layouts/_default/index.json index 8d4ac99a..789b95c5 100644 --- a/layouts/_default/index.json +++ b/layouts/_default/index.json @@ -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 -}}