[Solved] Question: Disable certain pages

Hi, I have create a single page website and trying to disable certain page from generation; as they are only data for constructing the sections in the homepage.

Each homepage’s section are separate into different markdowns, e.g., contact section is pulling content from contact.md. Now the issue is Hugo generated the “/contact” url and its own page, so how can I disable it?

Here is the site for your reference.

Thanks!

You ought to contact the theme author to disable that.

If you aren’t using any pages aside from the home, you can try setting disableKinds in your site configuration options.

Thanks maiki, but it is actually a custom theme I created from scratch.

I have try with disableKinds is set, but homepage wont get any content as well.

I’ve seen single page themes use an empty single.html. Doesn’t feel right, but it might get the job done.

Thanks, I removed the single and list template in the _default folder, now it wont generate those pages anymore. But their links still appear when generate the sitemap. So I disallowed bots to crawl them in the robots.txt.

So I guess this is solved, thank you very much for your help @maiki !

Alternatively, you can set disableSitemap to true; if it is a single page site, it kinda maps itself! :slight_smile: