Why do pages disappear with `index.md` and reappear with `_index.md`?

So I have a basic structure:


All these markdown files are in the same directory, punctuation.

For some reason comma, period, and apostrophe don’t render. I get 404 on them. I rendered the site into public and found that the markdown of the missing pages was not even rendering. They’re just missing.

I tried turning the index.md into an _index.md and suddenly the pages render properly.

But I don’t want a list view (_index.md) but a page with custom descriptions and links to the content (an index.md).

Can someone explain what’s happening, and maybe suggest a solution?



I have found the following comment but I am not sure it solves my problem.

I think the only solution to my problem is to add an {{ if then }} into my list.html page checking for a flag that turns off rendering lists of pages. I hope that’s not true.

I would like to add that this page-bundle leaf (index.md) vs branch (_index.md) is very confusing as it introduces, in addition to the distinction between singles and lists, all kinds of other implications. Is this a logical relationship?

Trying to comprehend this at the moment:

A index.md tells Hugo to bundle all sibling and descendant files into a bundle. So they don’t disappear, they get wrapped up, so to speak.

Thank you for the reply.

How can I “unwrap” them and put them to use?

You can start by reading the documentation about “leaf bundles”.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.