Add excludesearch page parameter

This commit is contained in:
Will Faught
2022-12-13 21:51:53 -08:00
parent 8e5faf8813
commit e0ddce45e4
2 changed files with 3 additions and 1 deletions

View File

@@ -1,5 +1,5 @@
{{- $.Scratch.Add "index" slice -}}
{{- range .Site.RegularPages -}}
{{- range where .Site.RegularPages "Params.excludesearch" "ne" true -}}
{{- $.Scratch.Add "index" (dict "title" (.Title | markdownify | plainify | htmlUnescape) "description" (.Description | markdownify | plainify | htmlUnescape) "date" .PublishDate "categories" .Params.categories "tags" .Params.tags "keywords" .Params.keywords "text" (strings.TrimRight " " (replace (.Plain | htmlUnescape) "\n" " ")) "link" .RelPermalink) -}}
{{- end -}}
{{- $.Scratch.Get "index" | jsonify -}}