mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-27 01:33:04 +00:00
search: disable search in hidden pages #76
- invert config flag to streamline with other flags - invert default value to emulate pre-patch behaviour
This commit is contained in:
parent
a78207ab4e
commit
97336b2339
2 changed files with 3 additions and 3 deletions
|
@ -23,8 +23,8 @@ Note that some of these parameters are explained in details in other sections of
|
||||||
showVisitedLinks = false
|
showVisitedLinks = false
|
||||||
# Disable search function. It will hide search bar
|
# Disable search function. It will hide search bar
|
||||||
disableSearch = false
|
disableSearch = false
|
||||||
# Make hidden pages searchable
|
# Disable search in hidden pages, otherwise they will be shown in search box
|
||||||
searchHiddenPages = false
|
disableSearchHiddenPages = false
|
||||||
# Javascript and CSS cache are automatically busted when new version of site is generated.
|
# Javascript and CSS cache are automatically busted when new version of site is generated.
|
||||||
# Set this to true to disable this behavior (some proxies don't handle well this optimization)
|
# Set this to true to disable this behavior (some proxies don't handle well this optimization)
|
||||||
disableAssetsBusting = false
|
disableAssetsBusting = false
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{{- $pages := slice }}
|
{{- $pages := slice }}
|
||||||
{{- range .Site.Pages }}
|
{{- range .Site.Pages }}
|
||||||
{{- if or .Site.Params.searchHiddenPages (and (ne .Params.hidden true) (ne .Title "")) }}
|
{{- if and (ne .Site.Params.disableSearchHiddenPages true) (or (ne .Params.hidden true) (ne .Title "")) }}
|
||||||
{{- $pages = $pages | append (dict "uri" .RelPermalink "title" .Title "tags" .Params.tags "description" .Description "content" (.Plain | htmlUnescape)) }}
|
{{- $pages = $pages | append (dict "uri" .RelPermalink "title" .Title "tags" .Params.tags "description" .Description "content" (.Plain | htmlUnescape)) }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
Loading…
Reference in a new issue