Add excludesearch page parameter
This commit is contained in:
@@ -101,6 +101,8 @@ The `paige-search` layout provides full site search. It requires setting
|
||||
Set page parameter `excluderss` to true to exclude it from RSS. Doing so
|
||||
for a list page excludes the entire directory.
|
||||
|
||||
Set page parameter `excludesearch` to true to exclude it from search.
|
||||
|
||||
If `partials/paige-head-last.html` exists in the site, it is included at
|
||||
the end of the head tag. If `partials/paige-body-last.html` exists in
|
||||
the site, it is included at the end of the body tag.
|
||||
|
@@ -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 -}}
|
||||
|
Reference in New Issue
Block a user