diff --git a/layouts/partials/section-index.html b/layouts/partials/section-index.html index 665f301846..dd4876973a 100644 --- a/layouts/partials/section-index.html +++ b/layouts/partials/section-index.html @@ -2,6 +2,7 @@ {{ $parent := .Page }} {{ $pages := (where .Site.Pages "Section" .Section).ByWeight }} {{ $pages = (where $pages "Type" "!=" "search") }} + {{ $pages = (where $pages ".Params.hide_summary" "!=" true) }} {{ $pages = (where $pages "Parent.File.UniqueID" "==" $parent.File.UniqueID) }} {{ if or $parent.Params.no_list (eq (len $pages) 0) }} {{/* If no_list is true or we don't have subpages we don't show a list of subpages */}} diff --git a/userguide/content/en/docs/Adding content/navigation.md b/userguide/content/en/docs/Adding content/navigation.md index 63c672fef8..3e052aad82 100644 --- a/userguide/content/en/docs/Adding content/navigation.md +++ b/userguide/content/en/docs/Adding content/navigation.md @@ -78,7 +78,20 @@ description: > --- ``` -To hide a page or section from the menu, set `toc_hide: true` in front matter. +To hide a page or section from the left navigation menu, set `toc_hide: true` in the front matter. + +To hide a page from the section summary on a [docs section landing page]({{< ref "content#docs-section-landing-pages" >}}), set `hide_summary: true` in the front matter. If you want to hide a page from both the TOC menu and the section summary list, you need to set both `toc_hide` and `hide_summary` to `true` in the front matter. + +```yaml +--- +title: "My Hidden Page" +weight: 99 +toc_hide: true +hide_summary: true +description: > + Page hidden from both the TOC menu and the section summary list. +--- +``` ### Section menu options