2023-08-04 01:11:31 +01:00
|
|
|
{{- $pages := where .Site.Pages "Kind" "in" (slice "page" "section") -}}
|
|
|
|
{{- $pages = where $pages "Params.excludeSearch" "!=" true -}}
|
|
|
|
{{- $pages = where $pages "Content" "!=" "" -}}
|
|
|
|
|
2023-08-06 01:06:32 +01:00
|
|
|
{{- $output := dict -}}
|
2023-08-04 01:11:31 +01:00
|
|
|
|
2023-08-06 01:06:32 +01:00
|
|
|
{{- range $index, $page := $pages -}}
|
|
|
|
{{- $pageTitle := $page.LinkTitle | default $page.File.BaseFileName -}}
|
|
|
|
{{- $pageLink := $page.RelPermalink -}}
|
|
|
|
{{- $data := partial "utils/fragments" $page -}}
|
|
|
|
{{- $output = $output | merge (dict $pageLink (dict "title" $pageTitle "data" $data)) -}}
|
|
|
|
{{- end -}}
|
|
|
|
|
|
|
|
{{- $output | jsonify -}}
|