Hugo

Hugo renders page, restart server, returns 404. BUG?

I am working on a page at content/first/index.md that renders fine at http://localhost:1313/first.

Hugo 0.62.1 serving via hugo server -DFw.

I start working on a nested page at content/first/nested/index.md. I visit the browser and it renders at http://localhost:1313/first/nested.

I restart the server. http://localhost:1313/first/nested now returns 404.

Why?

EDIT: Also trying to create content/first/nested.md always returns a 404. This is so unnatural and confusing.

Renaming content/first/index.md to content/first/_index.md seems to help because of the bundles.

It would be VERY good if we got a warning instead of a 404.

It’s not that simple. How is hugo supposed to know if you intended to use an index.md or _index.md. It just does what you tell it.