hugo-PaperMod/layouts/_default/index.json
Aditya Telange 575cc0ca8c
Use site function instead of .Site or $.Site
- The site function provides global access to the same data as the .Site page method.
- Current context (`.`) is never considered.
2022-03-27 18:44:06 +05:30

8 lines
341 B
JSON

{{- $.Scratch.Add "index" slice -}}
{{- range site.RegularPages -}}
{{- 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 -}}