Specifically, a branch bundle. Renaming it to an index.*
(without the _ ) turns the dir into a leaf bundle. There are differences as to how each of these bundles treats content files (eg .md
) that reside in its directory.
Consider the pairs of content
<=> public
directories below:
Assuming fresh Hugo site, no weird configs, no unusual front matter, url
not set in front matter, draft: false
Scenario 1
No *index.md
= no page bundles.
content/lorem
├── four
│ ├── hello.md
│ └── world.md
├── one.md
├── three.md
└── two.md
public
├── lorem
│ ├── index.html
│ ├── four
│ │ ├── hello
│ │ │ └── index.html
│ │ └── world
│ │ └── index.html
│ ├── one
│ │ └── index.html
│ ├── three
│ │ └── index.html
│ └── two
│ └── index.html
Scenario 2
content/lorem
and content/lorem/four
have _index.md
: both are branch bundles.
content/lorem
├── four
│ ├── hello.md
│ ├── _index.md
│ └── world.md
├── _index.md
├── one.md
├── three.md
└── two.md
public
├── lorem
│ ├── four
│ │ ├── index.html # notice
│ │ ├── hello
│ │ │ └── index.html
│ │ └── world
│ │ └── index.html
│ ├── index.html
│ ├── one
│ │ └── index.html
│ ├── three
│ │ └── index.html
│ └── two
│ └── index.html
Scenario 3
content/lorem/four
has index.md
= leaf bundle
content/lorem
has _index.md
= branch bundle
content/lorem
├── four
│ ├── hello.md
│ ├── index.md
│ └── world.md
├── _index.md
├── one.md
├── three.md
└── two.md
public
├── lorem
│ ├── index.html
│ ├── four
│ │ └── index.html # notice
│ ├── one
│ │ └── index.html
│ ├── three
│ │ └── index.html
│ └── two
│ └── index.html
...
The reason the sub-pages (hello, world) under lorem/four
‘disappeared’ is because it is now a leaf bundle. As per the docs, (see the table comparing leaf v branch) content from non-index page files in leaf bundles are accessed only as page resources
I still don’t know what structure you want to end up with, so I can’t answer your specific use case.