diff --git a/exampleSite/content/basics/configuration/_index.en.md b/exampleSite/content/basics/configuration/_index.en.md index 4ba03390d4..4ac96f5c08 100644 --- a/exampleSite/content/basics/configuration/_index.en.md +++ b/exampleSite/content/basics/configuration/_index.en.md @@ -23,8 +23,8 @@ Note that some of these parameters are explained in details in other sections of showVisitedLinks = false # Disable search function. It will hide search bar disableSearch = false - # Make hidden pages searchable - searchHiddenPages = false + # Disable search in hidden pages, otherwise they will be shown in search box + disableSearchHiddenPages = false # 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) disableAssetsBusting = false diff --git a/layouts/index.json b/layouts/index.json index d5ad63b689..4128c70bfc 100644 --- a/layouts/index.json +++ b/layouts/index.json @@ -1,6 +1,6 @@ {{- $pages := slice }} {{- 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)) }} {{- end }} {{- end }}