File tree Expand file tree Collapse file tree 2 files changed +33
-7
lines changed Expand file tree Collapse file tree 2 files changed +33
-7
lines changed Original file line number Diff line number Diff line change 11{{- partialCached "page-meta.hugo" . .RelPermalink }}
22{{- $pages := slice }}
33{{- range .Site.Pages }}
4- {{- if and .Title (or (ne (.Scratch.Get "relearnIsHiddenStem") true) (ne .Site.Params.disableSearchHiddenPages true) ) }}
5- {{- $pages = $pages | append (dict "uri" (partial "relLangPrettyUglyURL.hugo" (dict "to" .)) "title" .Title "tags" .Params.tags "description" .Description "content" (.Plain | htmlUnescape)) }}
6- {{- end }}
7- {{- end }}
4+ {{- if and .Title (or (ne (.Scratch.Get "relearnIsHiddenStem") true) (ne .Site.Params.disableSearchHiddenPages true) ) }}
5+ {{- $title := .Title }}
6+ {{- if eq .Kind "taxonomy" }}
7+ {{- $title = i18n .Data.Plural }}
8+ {{- if not $title }}
9+ {{- $title = .Data.Plural | humanize }}
10+ {{- end }}
11+ {{- else if eq .Kind "term" }}
12+ {{- $title = i18n .Data.Singular }}
13+ {{- if not $title }}
14+ {{- $title = .Data.Singular | humanize }}
15+ {{- end }}
16+ {{- $title = printf "%s %s %s" $title (default "::" .Site.Params.titleSeparator) (.Title | humanize) }}
17+ {{- end }}
18+ {{- $pages = $pages | append (dict "uri" (partial "relLangPrettyUglyURL.hugo" (dict "to" .)) "title" $title "tags" .Params.tags "description" .Description "content" (.Plain | htmlUnescape)) }}
19+ {{- end }}
20+ {{- end - }}
821{{- $pages | jsonify (dict "indent" " ") }}
Original file line number Diff line number Diff line change 11{ { - partialCached "page-meta.hugo" . . RelPermalink } }
22{ { - $pages := slice } }
33{ { - range . Site . Pages } }
4- { { - if and . Title ( or ( ne ( . Scratch . Get "relearnIsHiddenStem" ) true ) ( ne . Site . Params . disableSearchHiddenPages true ) ) } }
5- { { - $pages = $pages | append ( dict "uri" ( partial "relLangPrettyUglyURL.hugo" ( dict "to" . ) ) "title" . Title "tags" . Params . tags "description" . Description "content" ( . Plain | htmlUnescape ) ) } }
6- { { - end } }
4+ { { - if and . Title ( or ( ne ( . Scratch . Get "relearnIsHiddenStem" ) true ) ( ne . Site . Params . disableSearchHiddenPages true ) ) } }
5+ { { - $title := . Title } }
6+ { { - if eq . Kind "taxonomy" } }
7+ { { - $title = i18n . Data . Plural } }
8+ { { - if not $title } }
9+ { { - $title = . Data . Plural | humanize } }
10+ { { - end } }
11+ { { - else if eq . Kind "term" } }
12+ { { - $title = i18n . Data . Singular } }
13+ { { - if not $title } }
14+ { { - $title = . Data . Singular | humanize } }
15+ { { - end } }
16+ { { - $title = printf "%s %s %s" $title ( default "::" . Site . Params . titleSeparator ) ( . Title | humanize ) } }
17+ { { - end } }
18+ { { - $pages = $pages | append ( dict "uri" ( partial "relLangPrettyUglyURL.hugo" ( dict "to" . ) ) "title" $title "tags" . Params . tags "description" . Description "content" ( . Plain | htmlUnescape ) ) } }
19+ { { - end } }
720{ { - end - } }
821var relearn_search_index = { { $pages | jsonify ( dict "indent" " ") }}
You can’t perform that action at this time.
0 commit comments