Confusion about branch bundle

According to the documentation for page bundles, a branch bundle can only contain non-page types. However, in the example at the bottom of the page, aren’t branch-content*.md page resources to be converted to HTML?

content/
├── branch-bundle-1
│   ├── branch-content1.md
│   ├── branch-content2.md
│   ├── image1.jpg
│   ├── image2.png
│   └── _index.md
└── branch-bundle-2
    ├── _index.md
    └── a-leaf-bundle
        └── index.md

You slightly misread … branch bundles can contain only non-page resources.

Both branch and leaf bundles of course contain the page they are bundling.

  • Leaf bundle = page (index.md) [+ page/non-page resources]
  • Branch bundle = page (_index.md) [+ non-page resources] [+ leaf bundles] [+ regular non-bundle pages]

Square brackets indicate optional portion of that bundle.

1 Like

Yes, the branch-content-*.md pages would be converted to HTML, because they are regular “non-bundle” pages. Branch bundles can contain a mix of regular pages and other branch/leaf bundles; leaf bundles cannot.

.md files other than the index.md in leaf bundles become page resources (something that a branch bundles cannot have), and so they don’t render to HTML directly.

Thanks for response. I would like to include an HTML file (generated by GParted) for illustration of a page resource. It would be nice to allow readers to directly view the HTML file without having to downlaod it. How would that be possible in Hugo?

In my personal GitLab Pages, I tried something like

content/
├── _index.md
├── post                # without _index.md
│   ├── post1.md
│   ├── post2.md
│   ├── post3
│   │   ├── _index.md
│   │   ├── index.md
│   │   ├── image2.png
│   │   └── gparted.htm
│   ...
└── page                # without _index.md
    └── a-leaf-bundle
        └── index.md

I’ve figured it out. It will be rendered as

content/
├── post                # not a bundle
│   ├── post1           # leaf bundle
│   │   └── index.html
│   ├── post2           # leaf bundle
│   │   └── index.html
│   ├── post3           # branch bundle
│   │   ├── index.html  # gparted can't be accessed
│   │   └── image2.png  # as a regular page, use page resources
│   ...
└── page                # without _index.md
    └── a-leaf-bundle
        └── index.html