Files
hugo_serialReader/layouts/_default/index.json
T
2025-05-13 15:51:18 -06:00

13 lines
532 B
JSON

{{- $.Scratch.Add "index" slice -}}
{{- $pages := union .RegularPages .Sections }}
{{- $pages = where site.RegularPages "Type" "in" site.Params.mainSections }}
{{- $pages = where $pages "Params.hiddenInHomeList" "!=" "true" }}
{{- range $pages -}}
{{- if and (not .Params.searchHidden) (ne .Layout `archives`) (ne .Layout `search`) }}
{{- $.Scratch.Add "index" (dict "title" .Title "content" .Plain "permalink" .Permalink "summary" .Summary) -}}
{{- end }}
{{- end -}}
{{- $.Scratch.Get "index" | jsonify -}}