mirror of
https://github.com/McShelby/hugo-theme-relearn
synced 2025-05-06 00:37:03 +08:00
search: hide non-site content #81
This commit is contained in:
parent
d53fc18c2b
commit
40fec76fae
@ -1,6 +1,6 @@
|
|||||||
{{- $pages := slice }}
|
{{- $pages := slice }}
|
||||||
{{- range .Site.Pages }}
|
{{- range .Site.Pages }}
|
||||||
{{- if or (ne (.Scratch.Get "relearnIsHiddenStem") true) (ne .Site.Params.disableSearchHiddenPages true) }}
|
{{- if and .Title (or (ne (.Scratch.Get "relearnIsHiddenStem") true) (ne .Site.Params.disableSearchHiddenPages true) ) }}
|
||||||
{{- $pages = $pages | append (dict "uri" .RelPermalink "title" .Title "tags" .Params.tags "description" .Description "content" (.Plain | htmlUnescape)) }}
|
{{- $pages = $pages | append (dict "uri" .RelPermalink "title" .Title "tags" .Params.tags "description" .Description "content" (.Plain | htmlUnescape)) }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user