hide archives and search page from being searched

This commit is contained in:
Aditya Telange 2021-01-30 12:53:14 +05:30
parent 0c28a4ad5a
commit c7b388346b
No known key found for this signature in database
GPG Key ID: 82E844EF3DA99E77

View File

@ -1,6 +1,6 @@
{{- $.Scratch.Add "index" slice -}}
{{- range .Site.RegularPages -}}
{{- if not .Params.searchHidden }}
{{- if and (not .Params.searchHidden) (ne .Layout `archives`) (ne .Layout `search`) }}
{{- $.Scratch.Add "index" (dict "title" .Title "content" .Plain "permalink" .Permalink "summary" .Summary) -}}
{{- end }}
{{- end -}}