Nuno Coração
2024-06-27 23:05:51 +01:00
parent 54d63fa4fc
commit 2ffe55a86a
2 changed files with 15 additions and 3 deletions
+14 -2
View File
@@ -5,7 +5,8 @@
{{ end }}
{{- range $pages -}}
{{- $section := .Site.GetPage "section" .Section -}}
{{- $index = $index | append (dict
{{- if .Date -}}
{{- $index = $index | append (dict
"date" (.Date | time.Format (.Site.Language.Params.dateFormat | default ":date_long"))
"title" (.Title | emojify | safeJS)
"section" ($section.Title | emojify | safeJS)
@@ -14,6 +15,17 @@
"permalink" .RelPermalink
"externalUrl" .Params.externalUrl
"type" .Type
) -}}
) -}}
{{- else -}}
{{- $index = $index | append (dict
"title" (.Title | emojify | safeJS)
"section" ($section.Title | emojify | safeJS)
"summary" (.Summary | safeJS)
"content" (.Plain | safeJS)
"permalink" .RelPermalink
"externalUrl" .Params.externalUrl
"type" .Type
) -}}
{{- end -}}
{{- end -}}
{{- $index | jsonify -}}