2022-11-13 10:33:32 +00:00
|
|
|
{{- partialCached "page-meta.hugo" . .RelPermalink }}
|
2022-11-01 23:14:19 +00:00
|
|
|
{{- $pages := slice }}
|
|
|
|
{{- range .Site.Pages }}
|
2023-05-19 09:09:05 +00:00
|
|
|
{{- if and .Title (or (ne (.Scratch.Get "relearnIsHiddenStem") true) (ne .Site.Params.disableSearchHiddenPages true) ) }}
|
|
|
|
{{- $title := .Title }}
|
|
|
|
{{- if eq .Kind "taxonomy" }}
|
|
|
|
{{- $title = i18n .Data.Plural }}
|
|
|
|
{{- if not $title }}
|
2023-06-18 09:13:33 +00:00
|
|
|
{{- $title = .Data.Plural }}
|
2023-05-19 09:09:05 +00:00
|
|
|
{{- end }}
|
|
|
|
{{- else if eq .Kind "term" }}
|
|
|
|
{{- $title = i18n .Data.Singular }}
|
|
|
|
{{- if not $title }}
|
2023-06-18 09:13:33 +00:00
|
|
|
{{- $title = .Data.Singular }}
|
2023-05-19 09:09:05 +00:00
|
|
|
{{- end }}
|
2023-05-19 16:46:00 +00:00
|
|
|
{{- $title = printf "%s %s %s" $title (default "::" .Site.Params.titleSeparator) .Title }}
|
2023-05-19 09:09:05 +00:00
|
|
|
{{- end }}
|
|
|
|
{{- $pages = $pages | append (dict "uri" (partial "relLangPrettyUglyURL.hugo" (dict "to" .)) "title" $title "tags" .Params.tags "description" .Description "content" (.Plain | htmlUnescape)) }}
|
|
|
|
{{- end }}
|
2022-11-01 23:14:19 +00:00
|
|
|
{{- end -}}
|
|
|
|
var relearn_search_index = {{ $pages | jsonify (dict "indent" " ") }}
|