Section VS page bundle

Hi!

Please, how Hugo knows if a folder is a page bundle or a section?

I’m testing and every time it complains about not finding the layout for a section or page… I can’t find an standard for it.

Thank you.

index.md ---> Page Bundle (leaf bundle)
_index.md ---> Section or Nested Section (branch bundle - this can be a bundle also)

(Updated to include the leaf & branch bundle description)

2 Likes

Thank you! This is what I thought, but… It’s the slug attribute! I found!

If I override the URL setting the slug on index.md front matter, Hugo thinks it’s a section.

No way! Hugo changed its mind again.

No need to use slug in the front matter. The folder name of the leaf Page Bundle becomes the slug.

As for the URL I also don’t set it in the front matter. I have configured URLs per section in my config.

I’m using the slug to keep the files with the same name on two different languages.

I gonna use {{ $resources := where (where $.Site.Pages ".Section" "supporters") ".Type" "pageResource" }} and set layout: none on every page resource. It seems to work for now.

Thank you.

1 Like

Does Hugo take the single.html when I use index.html and the list.html when I name it _index.html?

1 Like

Yes…

Here’s a summary of Page Bundles: index.md vs _index.md as I understand.

1 Like