I’m very new to Hugo and I’m trying to create my own template for a specific need. My requirement is to be able to organize content in folder up to 4 levels:
I would like then to be able to build a navigation menu from this
- Level1 (could be another name than “Level1” that is used in the filesystem path)
I’m thinking about having specific metadata in the YAML of each file. Something like
title = "Post"
level1 = "XXX"
level2 = "YYY"
level3 = "ZZZ"
level4 = “AAA”
- Do this approach seems reasonable ?
- How I can build a menu from those metadata ?
I took a look at multiple existing theme and I tried to understand how to use the template syntax but I didn’t find the way to implement this. I’m able to read the top sections and the metadata but I don’t know how to “group” them to build the menu.
Thanks for your help,