2022-11-01 23:14:19 +00:00
|
|
|
{{- $pages := slice }}
|
|
|
|
{{- range .Site.Pages }}
|
2024-08-29 10:28:34 +00:00
|
|
|
{{- if partial "_relearn/pageIsSpecial.gotmpl" . }}
|
2024-09-07 22:09:35 +00:00
|
|
|
{{- else if and .Title .RelPermalink (or (ne .Site.Params.disableSearchHiddenPages true) (not (partialCached "_relearn/pageIsHiddenSelfOrAncestor.gotmpl" (dict "page" . "to" .Site.Home) .Path .Site.Home.Path) ) ) }}
|
2024-04-27 12:38:19 +00:00
|
|
|
{{- $tags := slice }}
|
|
|
|
{{- range .GetTerms "tags" }}
|
2024-08-29 10:28:34 +00:00
|
|
|
{{- $tags = $tags | append (partial "title.gotmpl" (dict "page" .Page "linkTitle" true) | plainify) }}
|
2024-04-27 12:38:19 +00:00
|
|
|
{{- end }}
|
2023-09-23 22:27:39 +00:00
|
|
|
{{- $pages = $pages | append (dict
|
2024-08-29 10:28:34 +00:00
|
|
|
"uri" (partial "permalink.gotmpl" (dict "to" .))
|
|
|
|
"title" (partial "title.gotmpl" (dict "page" .) | plainify)
|
2024-04-27 12:38:19 +00:00
|
|
|
"tags" $tags
|
2024-08-27 13:35:48 +00:00
|
|
|
"breadcrumb" (trim (partial "breadcrumbs.html" (dict "page" . "dirOnly" true) | plainify | htmlUnescape) "\n\r\t ")
|
|
|
|
"description" (trim (or .Description .Summary | plainify | htmlUnescape) "\n\r\t " )
|
|
|
|
"content" (trim (.Plain | htmlUnescape) "\n\r\t ")
|
2023-09-23 22:27:39 +00:00
|
|
|
) }}
|
2023-05-19 09:09:05 +00:00
|
|
|
{{- end }}
|
2022-11-01 23:14:19 +00:00
|
|
|
{{- end -}}
|
2024-08-26 22:35:12 +00:00
|
|
|
var relearn_searchindex = {{ $pages | jsonify (dict "indent" " ") }}
|