summaryrefslogtreecommitdiff
path: root/layouts/index.json
blob: e50a721dfd26010e27ddef8175806a0b46e235c6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
{{- $allPages := slice -}}

{{- range (where site.RegularPages "Section" "!=" "") -}}
    {{- $currentPage := dict
        "title" .Title
        "summary" (.Summary | plainify | htmlUnescape)
        "url" .RelPermalink
        "section" (lang.Translate (.Section | singularize) | default (.Section | singularize | title))
        "date" (.Date.Format "2006-01-02T15:04:05Z07:00")
        "tags" .Params.tags
    -}}
    {{- $allPages = $allPages | append $currentPage -}}
{{- end -}}

{{ jsonify $allPages }}