Hugo update, index pages randomly cease to work

I think I found a bug, but I am still trying to figure it out.

When I run hugo server and edit pages, on reloads sometimes the server would not recognize index.md files anymore and instead show a list of pages for the corresponding directory. Is this known?

The problem is that it also happens in the initial state of the server, e.g. on some fresh starts it does everything correctly, on some it does only parts correctly. So I have to run hugo many times and check and hope that everything is correct for deployment.

ypnos

What version of Hugo are you using? Index.md has always been a hack. Use `_index.md, which will render according to a list template. I assume this is for a section page. See here:

https://hugodocs.info/templates/section-templates/#adding-content-and-front-matter-to-section-templates