2024-08-30 01:18:35 +02:00
|
|
|
{{- $index := slice -}}
|
|
|
|
{{- $pages := .Site.Pages -}}
|
|
|
|
{{- range $pages -}}
|
|
|
|
{{- $section := .Site.GetPage "section" .Section -}}
|
2024-09-21 02:33:49 +02:00
|
|
|
{{- $page := (dict
|
2024-08-30 01:18:35 +02:00
|
|
|
"title" (.Title | emojify | safeJS)
|
|
|
|
"section" ($section.Title | emojify | safeJS)
|
|
|
|
"summary" (.Summary | safeJS)
|
|
|
|
"content" (.Plain | safeJS)
|
|
|
|
"permalink" .RelPermalink
|
|
|
|
"externalUrl" .Params.externalUrl
|
|
|
|
"type" .Type
|
|
|
|
) -}}
|
2024-09-21 02:33:49 +02:00
|
|
|
{{- if .Date -}}
|
|
|
|
{{- $page = (merge $page (dict
|
|
|
|
"date" (.Date | time.Format (.Site.Language.Params.dateFormat | default ":date_long"))
|
|
|
|
)) -}}
|
2024-08-30 01:18:35 +02:00
|
|
|
{{- end -}}
|
2024-09-21 02:33:49 +02:00
|
|
|
{{- $index = $index | append $page -}}
|
2024-08-30 01:18:35 +02:00
|
|
|
{{- end -}}
|
|
|
|
window.SiteSearchIndex={{- $index | jsonify -}}
|