How to make multi-layer nav?

Hi,I’m new to Hugo and after a few weeks playing with it, now I want to create a multi-layer nav. But I found out I cannot do that.
I was the theme Beautiful-Hugo and what I want is similar to this:

└── 2020
    ├── 12
    │   ├──
    │   ├──
    │   ├──
    │   ├──
    │   └──

What I want is got a sub-menu of 2020 in my work menu [ x ]
and a list page in my work-2020 page [ ]

I have set the parent parameter in the 2020/ file like:

        title: "2020"
        parent: "work"

The 2020/12/ is set to :

        title: "2020-12"
        parent: "2020"

And what I got is a blank page at
However if I manually type the url to then I can get the list page as I expect.
What I’m missing?

Exactly how the menu is generated depends on the theme you’re using - so you’ll have to check your theme’s documentation for help.

As a general maybe-this-helps comment, setting the front matter in the .md files is usually only part of the story for making a menu in Hugo - you might well have to change your config.toml/.yaml file - But this depends on exactly what you’re theme is doing.

1 Like

I just don’t want to manually add menu entities inside my config.toml , so I’m looking for a more smarter way to handle this.
So maybe this happens because the theme itself not support? Is there anything I missing in the And I discover if I change which in the 2020/12/ folder to I will then got a blank page under the
Is there any other solution besides change a theme?

I wish I could help, but I don’t want to steer you in the wrong direction, and since I don’t know the theme in question I’m not best placed to comment on what the theme can/cannot do, sorry! Check with the theme author for support, or dig through the theme code itself to see what it’s doing. . .

1 Like

did you put in the page work “identifier” to which “parent” refers?

        title: "work"
        identifier: "work"

The same with submenus: every parent page needs an identifier for the subpages.

Yes. And I think this maybe a theme issue. Thinking about changing to another theme.