disabling a specific section in Hugo
Hugo is a great static site generator: it's fast and easy to get started with.
For a project, we wanted to hide some sections that weren't ready yet for primetime, even though some content had been created. While hugo allows for hiding of leaf bundles with the headless
parameter, I wasn't able to find a way to just hide an entire section full-stop.
The solution is simple. If you want to completely remove a section from the generated HTML, sitemaps, etc, just hide the relevant content folder in your file system.
So, if you have a folder like/content/posts
, just rename it to /content/.posts
and all of the content from within will be omitted.