2024-04-28 17:33:09 +02:00
|
|
|
{{- $index := slice -}}
|
|
|
|
{{ $pages := .Site.Pages }}
|
|
|
|
{{ range .Site.Home.Translations }}
|
|
|
|
{{ $pages = $pages | lang.Merge .Site.Pages }}
|
|
|
|
{{ end }}
|
|
|
|
{{- range $pages -}}
|
|
|
|
{{- $section := .Site.GetPage "section" .Section -}}
|
2024-07-15 22:27:55 +02:00
|
|
|
{{- if .Date -}}
|
|
|
|
{{- $index = $index | append (dict
|
2024-04-28 17:33:09 +02:00
|
|
|
"date" (.Date | time.Format (.Site.Language.Params.dateFormat | default ":date_long"))
|
|
|
|
"title" (.Title | emojify | safeJS)
|
|
|
|
"section" ($section.Title | emojify | safeJS)
|
2024-06-26 21:44:28 +02:00
|
|
|
"summary" (.Summary | safeJS)
|
|
|
|
"content" (.Plain | safeJS)
|
2024-04-28 17:33:09 +02:00
|
|
|
"permalink" .RelPermalink
|
|
|
|
"externalUrl" .Params.externalUrl
|
|
|
|
"type" .Type
|
2024-07-15 22:27:55 +02:00
|
|
|
) -}}
|
|
|
|
{{- 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 -}}
|
2024-04-28 17:33:09 +02:00
|
|
|
{{- end -}}
|
2024-06-26 21:44:28 +02:00
|
|
|
{{- $index | jsonify -}}
|