Getting 404 with other folders

I have the following directory structure for content:

content
    docs
        folder1
           folder1.md
       folder2
          folder2.md
       index.md

When I am hitting the url localhost:1313/docs/folder1/folder1/ I am able to see the contents but when I hit the url localhost:1313/docs/folder2/folder2 it’s giving 404 error.
I am unable to understand how can this be and how to fix it.

Can someone please help me with it?

Thanks

Rename index.md to _index.md.

https://gohugo.io/troubleshooting/faq/#what-is-the-difference-between-an-indexmd-file-and-an-_indexmd-file

Thank you so much for your answer.

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