Skip to content

Commit

Permalink
Add showcase for hidden sections without index.html
Browse files Browse the repository at this point in the history
  • Loading branch information
istr authored Nov 6, 2023
1 parent 71316e1 commit b40fff3
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions content/en/content-management/build-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,3 +100,24 @@ cascade:
{{ end }}
</section>
{{< /code >}}

#### Not rendering an index file for a hidden section

Website wants to hide a section from sitemap, menu and other navigation, but still wants to have all children rendered.

See the forum question: [Disable generating empty index.html pages created for sections](https://discourse.gohugo.io/t/disable-generating-empty-index-html-pages-created-for-sections/11036/1)

This use case leverages [`cascade`](/content-management/front-matter#front-matter-cascade) as well.

{{< code-toggle >}}
title: Section without index file
url: /hidden-section/
_build:
render: never
list: never
publishResources: false
cascade:
_build:
list: false
render: true
{{< /code-toggle >}}

0 comments on commit b40fff3

Please sign in to comment.