search: hide non-site content #81

This commit is contained in:
Sören Weber 2021-09-04 12:23:55 +02:00
parent d53fc18c2b
commit 40fec76fae
No known key found for this signature in database
GPG key ID: 07D17FF580AE7589

View file

@ -1,6 +1,6 @@
{{- $pages := slice }}
{{- 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)) }}
{{- end }}
{{- end }}