Hide a section

Want to hide an entire section?

Assuming you have your content under content/secret-door directory, add this to Hugo config.toml.

hiddenSections = ["secret-door"]

Now any page under the secret-door section will not be listed in sitemap. The only way for search engines to find this page is if any other public webpage on the internet links to it.

This does not apply to the “posts” section.

Hide a specific page

Add private: true to the frontmatter of the content.

This does not apply to any page in the “posts” section.