16 lines
721 B
JSON
16 lines
721 B
JSON
{{/* layouts/_default/index.json */}}
|
|
{{- $index := slice -}}
|
|
{{- range where .Site.RegularPages.ByDate.Reverse "Type" "not in" (slice "page" "json") -}}
|
|
{{ if .Params.dateCreated }}
|
|
{{ $.Scratch.Set "date" (.Params.dateCreated) }}
|
|
{{ else }}
|
|
{{- if isset site.Params "dateFmt" -}}
|
|
{{- $.Scratch.Set "date" (.Date.Format .Site.Params.dateFmt) -}}
|
|
{{- else -}}
|
|
{{- $.Scratch.Set "date" (.Date.Format "2006-01-02") -}}
|
|
{{- end -}}
|
|
{{ end }}
|
|
{{- $index = $index | append (dict "title" ( .Title | plainify ) "permalink" .Permalink "tags" .Params.tags "description" (.Params.description | markdownify | htmlUnescape | plainify) "date" ($.Scratch.Get "date") ) -}}
|
|
{{- end -}}
|
|
{{- $index | jsonify -}}
|