Section included in sitemap, even if it is not rendered?

Hello,
I have some generic pages in a hierarchy like /content/pages/contact.md and /content/pages/price.md … which are directly linked in the main menu navigation, and I don’t want to render /content/pages/ itself. Everything seems to work fine by simply not providing a template… but it is still included in the sitemap, even though no /pages/index.html generated… basically generated a dead link in the sitemap? It also generates an rss feed in index.xml which i don’t need…

I have tried creating a /content/pages/_index.md and setting outputs = [] which is completely ignored to setting outputs = [‘html’] which actually disables output of /public/pages/index.xml … the /public/sitemap.xml still includes a link to /pages/

Is this supposed to happen? I have seen a few threads that it’s not possible to exclude a page from the sitemap … but if the page isn’t actually rendered in any form, and no file is created for it, I can’t see a reason why the sitemap would create a link to it? Any help would be appreciated.

thanks,
Herbert

No that is not true. See here: Allow taxonomy with limitations - #10 by onedrawingperday

As for disabling an RSS feed see disableKinds in Configuration Settings

thanks, so i just have to create my own sitemap template… (I was referring to issues like https://github.com/gohugoio/hugo/issues/653 which basically concluded with the same thing) … i just thought there might be a way out of the box… since i don’t quite understand why the sitemap would link to a page which is not actually created and hence produces a 404…

Hugo treats all first-level directories as sections (logical nodes in the hierarchy) whether or not you include a _index.

You only have control over whether subdirectories are mapped to logical section nodes in the hierarchy (by including an _index file). But even here your control is not absolute. Hugo will automatically turn a subdirectory into a section node if any child directory is a section node (has a _index file). I don’t agree with this design, but that’s what it is.

If you do not provide a template for a page, Hugo willl log a warning.