staticsite/themes/fiscleconsult/layouts/index.json

11 lines
440 B
JSON
Raw Normal View History

2020-12-06 23:50:32 +00:00
{{- $.Scratch.Add "pagesIndex" slice -}}
{{- range $index, $page := .Site.Pages -}}
{{- if in (slice "category" ) $page.Type -}}
{{- if gt (len $page.Content) 0 -}}
{{- $pageData := (dict "title" $page.Title "href" $page.Permalink "categories" (delimit $page.Params.tags " ; ") "content" $page.Plain ) -}} {{- $.Scratch.Add "pagesIndex" $pageData -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{- $.Scratch.Get "pagesIndex" | jsonify -}}