add updated date to json feed

main
Dominic Reich 1 year ago
parent 6bcc04d506
commit 02b7cdb054
Signed by: dominic
GPG Key ID: BC9D6AE1A3BE169A

@ -0,0 +1,16 @@
{{- $index := slice -}}
{{- range .Site.Pages -}}
{{- $section := .Site.GetPage "section" .Section -}}
{{- $showDate := .Params.showDate | default .Site.Params.article.showDate -}}
{{- $index = $index | append (dict
"date" (cond (and .IsPage $showDate) (.Date | time.Format (site.Params.dateFormat | default ":date_long")) nil)
"updated" (cond (and .IsPage $showDate) (.Lastmod | time.Format (site.Params.dateFormat | default ":date_long")) nil)
"title" (.Title | emojify | safeJS)
"section" ($section.Title | emojify | safeJS)
"summary" (.Summary | emojify | safeJS)
"content" (.Plain | emojify | safeJS)
"permalink" .RelPermalink
) -}}
{{- end -}}
{{- $index | jsonify -}}
Loading…
Cancel
Save