I started a new docsite based on the material docs theme, although I noticed that it’s fallen out of date and is not being maintained. I am relatively new to Hugo and to go templating but have made some progress getting it working with the latest Hugo and adjusting it to my needs. However, I have not been able to get the sidebar navigation to work properly, particularly with submenus. I have been reading closely all of the discussion around this https://github.com/digitalcraftsman/hugo-material-docs/issues/70 but there does not seem to be any resolution and none of the suggestions are working for me. At present, the menu displays the top-level items correctly, but all other items show a blank page. Would anyone be able to advise me on what may be going wrong? You can see my repo here https://github.com/emanic/material-docs
Update: I’ve gotten the menu working in a better fashion. This seems to be down to the presence of an _index.md file at the root. If that is not there, the submenus do not appear. However, the menu is still broken. In the Welcome directory, I have a single _index.md of type index. This menu behaves as expected. However, if I have any other files of type index, their contents get tacked onto the end of the Welcome page.
The type of the file seems to control this behavior, as it is also true with other types. At present, I have all the other files set to type single. As a result, in the other menus have the contents of all of the files with type single.
If I do not have an _index.md file, I don’t see any submenus. But if I do not have an index.md file, I get a blank page when I click on the top-level menu entry. So I need both files.
In addition, if a top-level menu has a submenu, the submenu is not collapsed by default.