diff --git a/layouts/_default/index.json b/layouts/_default/index.json index 74ff61b1a6..f0c5ea4ff2 100644 --- a/layouts/_default/index.json +++ b/layouts/_default/index.json @@ -1,7 +1,7 @@ {{- partialCached "page-meta.hugo" . .RelPermalink }} {{- $pages := slice }} {{- range .Site.Pages }} - {{- if and .Title (or (ne (.Scratch.Get "relearnIsHiddenStem") true) (ne .Site.Params.disableSearchHiddenPages true) ) }} + {{- if and .Title .RelPermalink (or (ne (.Scratch.Get "relearnIsHiddenStem") true) (ne .Site.Params.disableSearchHiddenPages true) ) }} {{- $title := .Title }} {{- if eq .Kind "taxonomy" }} {{- $title = i18n .Data.Plural }} diff --git a/layouts/_default/index.search.js b/layouts/_default/index.search.js index d1c5dfa572..4e98237b5c 100644 --- a/layouts/_default/index.search.js +++ b/layouts/_default/index.search.js @@ -1,7 +1,7 @@ {{- partialCached "page-meta.hugo" . .RelPermalink }} {{- $pages := slice }} {{- range .Site.Pages }} - {{- if and .Title (or (ne (.Scratch.Get "relearnIsHiddenStem") true) (ne .Site.Params.disableSearchHiddenPages true) ) }} + {{- if and .Title .RelPermalink (or (ne (.Scratch.Get "relearnIsHiddenStem") true) (ne .Site.Params.disableSearchHiddenPages true) ) }} {{- $title := .Title }} {{- if eq .Kind "taxonomy" }} {{- $title = i18n .Data.Plural }}