2022-09-10 20:05:37 +01:00
|
|
|
{{- $index := slice -}}
|
2024-03-14 00:01:32 +00:00
|
|
|
{{ $pages := .Site.Pages }}
|
|
|
|
{{ range .Site.Home.Translations }}
|
|
|
|
{{ $pages = $pages | lang.Merge .Site.Pages }}
|
|
|
|
{{ end }}
|
|
|
|
{{- range $pages -}}
|
2022-09-10 20:05:37 +01:00
|
|
|
{{- $section := .Site.GetPage "section" .Section -}}
|
2024-06-27 23:05:51 +01:00
|
|
|
{{- if .Date -}}
|
|
|
|
{{- $index = $index | append (dict
|
2022-09-10 20:05:37 +01:00
|
|
|
"date" (.Date | time.Format (.Site.Language.Params.dateFormat | default ":date_long"))
|
|
|
|
"title" (.Title | emojify | safeJS)
|
|
|
|
"section" ($section.Title | emojify | safeJS)
|
2024-05-31 12:37:29 +02:00
|
|
|
"summary" (.Summary | safeJS)
|
|
|
|
"content" (.Plain | safeJS)
|
2022-09-10 20:05:37 +01:00
|
|
|
"permalink" .RelPermalink
|
2024-03-10 10:31:37 +00:00
|
|
|
"externalUrl" .Params.externalUrl
|
2024-03-14 00:01:32 +00:00
|
|
|
"type" .Type
|
2024-06-27 23:05:51 +01: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 -}}
|
2022-09-10 20:05:37 +01:00
|
|
|
{{- end -}}
|
2024-05-31 15:04:29 +01:00
|
|
|
{{- $index | jsonify -}}
|