I added code I found on the community for a recursive menu
Fairly certain that I want a parent link in the nav to NOT navigate to the _index.md content but rather to open submenus (eventually accordion style)
My top-level Menu Items (Gizmos and Widgets) have an overview page that is the _index.md and results in a list of children items. In the case of Gizmos, that is Overview, Resources, Tutorial, and a branch bundle—Articles.
Question: How do I make the branch bundle, Articles, have an overview page that lists the 3 articles?
I have tried a number of different things in the front-matter and I can’t get it to work.
Hi Patrick, thanks for the suggestion. I tried that, but no luck. If that file does not have a parent declared, then it makes it a top-level item, where as I want that Overview page to be under Gizmos. Also, I want the same behavior in the nested items below(e.g. Articles). Anyway, I’ll keep working at it. Thanks!
I am just looking for a way to build a mult-level menu system. Parents open an accordion to reveal the children. Click on the children and they navigate to the content. I am just looking for standard behavior. Nothing out of the ordinary. Here is a very common example:
So the way I understand your question is that there are really two parts to it:
What structure / hierarchy do you want generated: What pages get nested under where
How to style it. The ‘accordion style’ that you reference is really a mix of CSS and probably some JS, and technically is outside the scope of Hugo and these forums.
We can probably help you with the first, and that should help you get the rest of the way with styling your menu.
So back to the first part:
When I run your site and navigate to /docs/, I see the following menu in the sidebar:
Hi, Pointyfar. Thanks for your help. CSS styles are out of the scope of this question. This post is specifically dealing with structure. Your outline follows what I had posted above. So to answer you first question, yes this is the hierarchy I want. But to be clear its technically
But this question is just focusing on the docs section and making a nested menu for the docs content. Make sense?