8 lines
No EOL
439 B
JSON
8 lines
No EOL
439 B
JSON
{{- $.Scratch.Add "pagesIndex" slice -}}
|
|
{{- range $index, $page := (where .Site.RegularPages "Path" "like" (printf "^%s" .CurrentSection.Path)) -}}
|
|
{{- if gt (len $page.Content) 0 -}}
|
|
{{- $pageData := (dict "title" (or $page.Title $page.File.LogicalName) "href" $page.Permalink "content" $page.Plain) -}}
|
|
{{- $.Scratch.Add "pagesIndex" $pageData -}}
|
|
{{- end -}}
|
|
{{- end -}}
|
|
{{- $.Scratch.Get "pagesIndex" | jsonify -}} |