Hide a Page in Hugo
Option 1: Draft The simplest way to hide a page when using Hugo is probably to set the post as a draft. This way, you still have the content ready to go for when you need it. To hide a page by setting it as draft, so our drafts page: Set Post as Draft Tutorial Option 2: Hide from Posts List You still want the page to be visible, but you don’t want to show it your blog posts list?
Check If a Page Is the Home Page
When writing and changing Hugo templates you will often want to act differently based on whether the page you are looking at is the home page, or any other page. So the post pages, contact, about etc won’t have this content show.
Only Show HTML When on Local/Production
For Hugo Themes, you will sometimes want to act differently between you working on the site, developing it, and the site if it’s running publicly on the internet. One example of this is if you show advertisements - you don’t want them showing on local (and contributing to impressions) but you would want to show them to the world. The reverse is also true, you could load scripts like livereload only on local development, through hugo server.