I’m new to Hugo but not to SSGs. I have been pulling out my hair trying to get Hugo to generate an index.html under each section in /public/ and I would really appreciate some feedback.
Scenario: I have a Hugo-based documentation website with several pages organized by section (/content/section1, /content/section2, etc.). I want users to be able to click the section name in a breadcrumb navigation and have it load an index page at /public/section/index.html which lists all of the pages under that particular section. I have a full ToC on the homepage, and the navbar is generating the breadcrumb as expected, but without the index.html files, the links are 404.
Thus far, I’ve created the following templates and files without effect:
/themes/theme/layouts/_default/list.html /themes/theme/layouts/_default/section.html /themes/theme/layouts/section/index.html /content/section1/_index.md /content/section2/index.md
Regardless of what I do, Hugo will not generate an index.html page under any of the section directories in /public.
This seems like such an easy thing to accomplish, but I just can’t figure it out. I do see that section indexes are generated in the root of /public (/public/section1.html, /public/section2.html, etc.), but that’s not what I want.
I’d appreciate any feedback you can provide.