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
|
Set page parameter `excluderss` to true to exclude it from RSS. Doing so
|
||||||
for a list page excludes the entire directory.
|
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
|
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 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.
|
the site, it is included at the end of the body tag.
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
{{- $.Scratch.Add "index" slice -}}
|
{{- $.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) -}}
|
{{- $.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 -}}
|
{{- end -}}
|
||||||
{{- $.Scratch.Get "index" | jsonify -}}
|
{{- $.Scratch.Get "index" | jsonify -}}
|
||||||
|
Reference in New Issue
Block a user