Defining child menus in config.toml

I am wanting to create a menu structure like this:


I’d like to define both Menu1 and SubMenu1 in my config.toml file. As far as I can tell, this should be supported. So, I have this in my config.toml file:

	name = "About"
	weight = 1   
    name = "Installation"
    identifier = "install"
    weight = 2	
    name = "Cloud"
    parent = "install"

Cloud never appears. I can’t find anywhere in the dos where it says this type of config is not allowed. Is it a toml problem?

The TOML spec has some documented restrictions, but it’s impossible to judge by your incomplete example,

So, instead of saying, “hey, if you can provide me this additional information in your example and I might be able to help” you just critique the content of my question? Maybe you don’t realize the unfriendly and dismissive tone your response conveys.

You read a lot into one sentence. My point was: For someone to be able to help you with your problem, more context is needed.

One relevant restriction in the TOML spec is that only maps (or dictionaries) can follow a map. So putting the menu section in the middle of config.toml will give confusing results.

@bjornerik Thank you for responding as quickly as you did and trying to help. It appears, from your answer, you wanted the entire config.toml — which I didn’t provide. It perhaps wasn’t clear, I had already done extensive research and spent time on my own trying to solve this. I’m aware toml is sensitive to element positioning, so I had ruled that out already.

I was able to solve my issue by ensuring there was one blank line at the end of config.toml file.

As a side note, I have seen inconsistent behavior with Hugo’s watch feature that may have been a factor. Hard to say, it was late when I encountered the toml problem. Since I’m on a tight timeline for my project, I haven’t spent time trying to characterize the actual issue with watch. I’m just rebuilding after each change to eliminate it as a factor in display problems.