2022-12-29 14:44:37 +00:00
|
|
|
{{/* 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 }}
|
2024-09-19 20:42:40 +00:00
|
|
|
{{- if isset site.Params "dateFmt" -}}
|
|
|
|
{{- $.Scratch.Set "date" (.Date.Format .Site.Params.dateFmt) -}}
|
2022-12-29 14:44:37 +00:00
|
|
|
{{- else -}}
|
|
|
|
{{- $.Scratch.Set "date" (.Date.Format "2006-01-02") -}}
|
|
|
|
{{- end -}}
|
|
|
|
{{ end }}
|
2022-12-29 14:46:16 +00:00
|
|
|
{{- $index = $index | append (dict "title" ( .Title | plainify ) "permalink" .Permalink "tags" .Params.tags "description" (.Params.description | markdownify | htmlUnescape | plainify) "date" ($.Scratch.Get "date") ) -}}
|
2022-12-29 14:44:37 +00:00
|
|
|
{{- end -}}
|
2024-09-19 20:42:40 +00:00
|
|
|
{{- $index | jsonify -}}
|