# A suggestion on branch bundles and leaf bundles

**URL:** <https://discourse.gohugo.io/t/a-suggestion-on-branch-bundles-and-leaf-bundles/31465>\
**Category:** support\
**Created:** [February 28, 2021, 7:29pm UTC](https://discourse.gohugo.io/t/a-suggestion-on-branch-bundles-and-leaf-bundles/31465 "2021-02-28T19:29:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![LunaticMuch](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/lunaticmuch/32/9164_2.png) [@LunaticMuch](https://discourse.gohugo.io/u/LunaticMuch)\
**Post date:** [February 28, 2021, 7:29pm UTC](https://discourse.gohugo.io/t/a-suggestion-on-branch-bundles-and-leaf-bundles/31465/1 "2021-02-28T19:29:26Z")

</div>

Hi  
I’m looking for some ideas on bundles. I am creating a doc website and I need to have some hierarchical structure. Ideally, I drafted something like:

```auto
content
  docs
    _index.md
    getting-stated
      index.md
      why-this-software.md
      what-is-this-software.md
    how-to-use
    advanced-topics

```

With a `{{range where .Site.RegularPages "Section" "docs" }}` I can get the list of three bundles.  
In the `getting-stated` bundle I have my `index.md` which is useful for sourcing something from the content matter, but nothing more than that.  
Each file has a weight and I need it for ordering the page appearance, but if you hit the url `/docs/getting-started` you should see nothing. The content is really ordered in the various markdown files inside the leaf bundle.  
Another alternative I see is to make the `getting-started` as a bundle branch and name each leaf as the file name instead of a page.

```auto
content
  docs
    _index.md
    getting-stated
      _index.md
      why-this-software
         index.md
      what-is-this-software
         index.md
    how-to-use
    advanced-topics

```

but this would transform the `getting-started` in a list I do not need. My `/docs` would need to list the bundles (first level of bundles) and then link to the starting point of each bundle. The intermediate list of the second level is useless.

In my first option, I am not finding a way to generate the list of pages within a leaf bundle, which is probably what moved my thinking (as a workaround) in 2 nested bundles, giving me back the problem of managing a list I do not need.

I went through some docs and an [old link](https://scripter.co/hugo-leaf-and-branch-bundles/) for driving the right bundle decision but I am a bit confused now.  
Any suggestion?

Thanks  
LM

---

<div class="post-metadata">

**Author:** ![alexandros](https://avatars.discourse-cdn.com/v4/letter/a/ecc23a/32.png) [@alexandros](https://discourse.gohugo.io/u/alexandros)\
**Post date:** [February 28, 2021, 7:55pm UTC](https://discourse.gohugo.io/t/a-suggestion-on-branch-bundles-and-leaf-bundles/31465/2 "2021-02-28T19:55:26Z")

</div>

Since you want to output several pages under `/getting-started/`, it makes sense to set it as a Branch Bundle.

You can turn off the creation of the `/getting-started/` Section listing by setting its build options in the `_index.md`:

```auto
_build:
list: never

```

Also see:

> **[Build Options](https://gohugo.io/content-management/build-options/#readout)**
>
> Build options help define how Hugo must treat a given page when building the site.

---

<div class="post-metadata">

**Author:** ![LunaticMuch](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/lunaticmuch/32/9164_2.png) [@LunaticMuch](https://discourse.gohugo.io/u/LunaticMuch)\
**Post date:** [February 28, 2021, 8:31pm UTC](https://discourse.gohugo.io/t/a-suggestion-on-branch-bundles-and-leaf-bundles/31465/3 "2021-02-28T20:31:04Z")

</div>

Thanks. I was not aware of it. The `never` value can’t work for me. With it, I do not even see the list when I do `{{ range .Sections }}` in the `/docs`. With `local` I can probably solve my problem.
