Control which pages get generated



Is there a way to make sure extra pages don’t get generated? I’ve organized content into bundles like so (for example):

article (dir)
|_ article-1 (dir)
    |__ resource.pdf
    |__ resouces.jpg

When I build the project I get a lot of extra single pages, that there is no way to get to, and also don’t need.

Any help would be appreciated.


Read Requesting Help and share some code, and someone will be able to help you. :slight_smile:


My hunch is that you are using Leaf Bundles when you really want to be using Branch Bundles. In other words, rename to

But as @maiki mentioned, you’ll need to share some code to confirm this.

Also see this thread: Can't figure out the very basics of content structure ↔︎ generated

And the hugo docs on page bundles:

1 Like

No, his setup may make sense.

Try this in your config:

disableKinds = ["home", "section", "taxonomy", "taxonomyTerm"]
1 Like

Ah, good point.

@zberwaldt You may want to disregard my previous comment.



The headless bundle is not the solution, either. Hugo does not to give the level of granular control I’m imagining in my head. Which is not a problem. I’ll just delete the index files by hand when I build the site.

Thanks for the input, @zberwaldt,@zwbetz, @bep, and @maiki

you’re, welcome @zberwaldt


I appreciate the help, but It’s my bad for giving poor information.

If I use @bep’s solution. Most of my content does not get generated. I do want my section pages and my home page.

If I switch all the to I still get index.html per bundle.

This is the part I should have done a better job at:

I have a section of publications. I have organized them into by year published like so:

   |_  /2018/
        |_  /research-of-robots/
            |_ pdf-about-robots.pdf
        ... so on and so forth
   |_ /2017/ #yada yada yada

My line of thinking was I’d have a master index page of all the years I have publications, which would go to another index page of all the publications of that year.

Each entry on a page would be all the relevant info of a particular publication, plus a download link for the pdf. But no dedicated page for any given publication.

Should I have instead moved all the publications to the front-matter of the parent list page?

title: "2016"
layout: years/list
- name: research-of-robots
  src: pdf-about-robots.pdf
  authors: ['Dave', 'Doug']

at the very least, it would simplify my directory tree.

Also, would converting my publications to headless bundles work? That seems close to what I am looking for.