Suppress the single view of a page

Hi guys,

I’m including multiple files in my index page, like the following:

content/
├ index/
│ ├ part1.md
│ └ part2.md
└ moreContent/

And /index.html contains the content of the sites located in content/index.

Now I would like to suppress the output of a /index/part1/index.html site, that is rendered with the single.html template. How can I do this?

I am already excluding those files from the menus, but they still appear in the sitemap. I dont care too much if they can be accessed with a direct link, I just don’t want google (and others) to index them

Headless page bundles can help you with that:

A headless bundle is a bundle that is configured to not get published anywhere:

  • It will have no Permalink and no rendered HTML in public/ .
  • It will not be part of .Site.RegularPages , etc.

But you can get it by .Site.GetPage . […]

1 Like