How do I create pages that do not produce a physical page?

I’m trying to create content for a section on the homepage called “services”. I have created a leaf bundle to store the images and everything works fine except it’s producing a /services url in the sitemap and Google is trying to crawl these non existent pages.

I have my content laid out like so, and most of the /directories contain content that displays on the homepage:

  • content/
    ---- services/
    ------ imgs/
    ------ index.md

Any ideas how to stop hugo producing a URL for this and to not treat it like page?

Headless bundles may meet your needs

1 Like

Perfecto! Thank you.

I’ve attempted this by hadding headless: true to the index.md files within the content directories. It’s still producing the sitemap:

<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"

xmlns:xhtml=“http://www.w3.org/1999/xhtml”>

  <url>
    <loc>https://example.co.uk/index/</loc>
    <lastmod>2018-11-06T21:17:40+00:00</lastmod>
  </url>
  
  <url>
    <loc>https://example.co.uk/footer/</loc>
  </url>
  
  <url>
    <loc>https://example/about/</loc>
  </url>
  
  <url>
    <loc>https://example/categories/</loc>
    <priority>0</priority>
  </url>
  
  <url>
    <loc>https://example/contact/</loc>
  </url>
  
  <url>
    <loc>https://example/</loc>
    <priority>0</priority>
  </url>
  
  <url>
    <loc>https://example/tags/</loc>
    <priority>0</priority>
  </url>
  
</urlset>

I’ve applied headless: true to content/services/index.md and content/gallary/index.md and it’s still producing them. I cleared the public/ directory before I re ran hugo.

Thanks

Ah, ignore me. Works now I had the old file open.