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-09-21 15:31:39 +00:00
|
|
|
{{- if and .Title .RelPermalink (or (ne (.Scratch.Get "relearnIsHiddenStem") true) (ne .Site.Params.disableSearchHiddenPages true) ) }}
|
2023-05-19 09:09:05 +00:00
|
|
|
{{- $title := .Title }}
|
|
|
|
{{- if eq .Kind "taxonomy" }}
|
2023-11-03 21:50:02 +00:00
|
|
|
{{- $title = default (default .Data.Plural (i18n .Data.Plural)) .Title }}
|
2023-05-19 09:09:05 +00:00
|
|
|
{{- else if eq .Kind "term" }}
|
2023-11-03 21:50:02 +00:00
|
|
|
{{- $taxonomy_page := .Site.GetPage .Data.Plural }}
|
|
|
|
{{- $title = default (default .Data.Singular (i18n .Data.Singular)) $taxonomy_page.Params.SingularTitle }}
|
2023-11-03 23:37:24 +00:00
|
|
|
{{- $title = printf "%s %s %s" $title (default "::" .Site.Params.titleSeparator) (default (humanize .Data.Term) .Title) }}
|
2023-05-19 09:09:05 +00:00
|
|
|
{{- end }}
|
2023-09-23 22:27:39 +00:00
|
|
|
{{- $pages = $pages | append (dict
|
|
|
|
"uri" (partial "relLangPrettyUglyURL.hugo" (dict "to" .))
|
|
|
|
"title" $title
|
|
|
|
"tags" .Params.tags
|
|
|
|
"breadcrumb" (trim ((partial "breadcrumbs.html" (dict "page" . "dirOnly" true)) | plainify | htmlUnescape) "\n\r\t ")
|
|
|
|
"description" .Description
|
|
|
|
"content" (.Plain | htmlUnescape)
|
|
|
|
) }}
|
2023-05-19 09:09:05 +00:00
|
|
|
{{- end }}
|
2022-11-01 23:14:19 +00:00
|
|
|
{{- end -}}
|
|
|
|
var relearn_search_index = {{ $pages | jsonify (dict "indent" " ") }}
|