menu: remove disabled sections from search index #642

This commit is contained in:
Sören Weber 2023-09-21 17:31:39 +02:00
parent 583f94e4b9
commit 660fd1c8d4
No known key found for this signature in database
GPG key ID: BEC6D55545451B6D
2 changed files with 2 additions and 2 deletions

View file

@ -1,7 +1,7 @@
{{- partialCached "page-meta.hugo" . .RelPermalink }}
{{- $pages := slice }}
{{- range .Site.Pages }}
{{- if and .Title (or (ne (.Scratch.Get "relearnIsHiddenStem") true) (ne .Site.Params.disableSearchHiddenPages true) ) }}
{{- if and .Title .RelPermalink (or (ne (.Scratch.Get "relearnIsHiddenStem") true) (ne .Site.Params.disableSearchHiddenPages true) ) }}
{{- $title := .Title }}
{{- if eq .Kind "taxonomy" }}
{{- $title = i18n .Data.Plural }}

View file

@ -1,7 +1,7 @@
{{- partialCached "page-meta.hugo" . .RelPermalink }}
{{- $pages := slice }}
{{- range .Site.Pages }}
{{- if and .Title (or (ne (.Scratch.Get "relearnIsHiddenStem") true) (ne .Site.Params.disableSearchHiddenPages true) ) }}
{{- if and .Title .RelPermalink (or (ne (.Scratch.Get "relearnIsHiddenStem") true) (ne .Site.Params.disableSearchHiddenPages true) ) }}
{{- $title := .Title }}
{{- if eq .Kind "taxonomy" }}
{{- $title = i18n .Data.Plural }}