17 lines
575 B
JSON
17 lines
575 B
JSON
{{- $pages := where .Site.RegularPages "Type" "in" .Site.Params.mainSections -}}
|
|
{{- $filtered := where $pages "Params.hidden" "!=" true -}}
|
|
|
|
{{- $result := slice -}}
|
|
|
|
{{- range $filtered -}}
|
|
{{- $data := dict "title" .Title "date" .Date "permalink" .RelPermalink "content" (.Plain) -}}
|
|
|
|
{{- $image := partial "helper/image" (dict "Image" .Params.image "Resources" .Resources) -}}
|
|
{{- if $image -}}
|
|
{{- $data = merge $data (dict "image" $image.Permalink) -}}
|
|
{{- end -}}
|
|
|
|
{{- $result = $result | append $data -}}
|
|
{{- end -}}
|
|
|
|
{{ jsonify $result }} |