Remove links from sitemap.xml

#1

I added a product archetype that gets used on the home page. But I do not want any detail views/single.html layout/permalinks for this content. I do not want links to this content added to my sitemap.xml.

How do I hide stuff from the sitemap? Or maybe - how do I prevent content to use the _default/single.html layout? It is meant to be like a partial… that you can edit. It’s just a block on the home page.

I do this in my index.html

{{ range $i,$p := (where .Data.Pages “Section” “product”) }}

#2

One method:

#3

Change the template, set layout in frontmatter.

  • Copy single.html to single2.html
  • remove {{ .Content }} from single2.html
  • set layout = single2 in frontmatter