[solved] Menu in YAML: What syntax?

Hello,
I generally prefer YAML, so in my config.yml I am trying to write the menu referring to the TOML example given by @digitalcraftsman. Here is my current menu, but it yelds the error shown below.

menu:
  material:
    name: "Material"
    url: "/"
    weight: 0
  getting:
    name: "Getting started"
    url: "getting-started/"
    weight: 10
  adding:
    name: "Adding content"
    url: "adding-content/"
    weight: 20
  roadmap:
    name: "Roadmap"
    url: "roadmap/"
    weight: 30
  licence:
    name: "License"
    url: "license/"
    weight: 40

And the Hugo output:

me@home:~/texte/sites-web/mysite$ hugo
Started building site
ERROR: 2016/09/08 22:07:33 site.go:1132: unable to process menus in site config
ERROR: 2016/09/08 22:07:33 site.go:1133: Unable to Cast map[interface {}]interface {}{"name":"License", "url":"license/", "weight":40} of type map[interface {
}]interface {} to []interface{}
ERROR: 2016/09/08 22:07:33 site.go:1132: unable to process menus in site config
ERROR: 2016/09/08 22:07:33 site.go:1133: Unable to Cast map[interface {}]interface {}{"name":"Material", "url":"/", "weight":0} of type map[interface {}]interface {} to []interface{}
ERROR: 2016/09/08 22:07:33 site.go:1132: unable to process menus in site config
ERROR: 2016/09/08 22:07:33 site.go:1133: Unable to Cast map[interface {}]interface {}{"name":"Getting started", "url":"getting-started/", "weight":10} of type map[interface {}]interface {} to []interface{}
ERROR: 2016/09/08 22:07:33 site.go:1132: unable to process menus in site config
ERROR: 2016/09/08 22:07:33 site.go:1133: Unable to Cast map[interface {}]interface {}{"name":"Adding content", "url":"adding-content/", "weight":20} of type map[interface {}]interface {} to []interface{}
ERROR: 2016/09/08 22:07:33 site.go:1132: unable to process menus in site config
ERROR: 2016/09/08 22:07:33 site.go:1133: Unable to Cast map[interface {}]interface {}{"name":"Roadmap", "url":"roadmap/", "weight":30} of type map[interface {}]interface {} to []interface{}
ERROR: 2016/09/08 22:07:33 template.go:131: template: theme/partials/drawer.html:39:18: executing "theme/partials/drawer.html" at <len .Site.Menus.main>: error calling len: len of untyped nil in theme/partials/drawer.html
ERROR: 2016/09/08 22:07:33 template.go:131: template: theme/partials/drawer.html:39:18: executing "theme/partials/drawer.html" at <len .Site.Menus.main>: error calling len: len of untyped nil in theme/partials/drawer.html
ERROR: 2016/09/08 22:07:33 template.go:131: template: theme/partials/drawer.html:39:18: executing "theme/partials/drawer.html" at <len .Site.Menus.main>: error calling len: len of untyped nil in theme/partials/drawer.html
ERROR: 2016/09/08 22:07:33 template.go:131: template: theme/partials/drawer.html:39:18: executing "theme/partials/drawer.html" at <len .Site.Menus.main>: error calling len: len of untyped nil in theme/partials/drawer.html
ERROR: 2016/09/08 22:07:33 template.go:131: template: theme/partials/drawer.html:39:18: executing "theme/partials/drawer.html" at <len .Site.Menus.main>: error calling len: len of untyped nil in theme/partials/drawer.html
ERROR: 2016/09/08 22:07:33 template.go:131: template: theme/partials/drawer.html:39:18: executing "theme/partials/drawer.html" at <len .Site.Menus.main>: error calling len: len of untyped nil in theme/partials/drawer.html
ERROR: 2016/09/08 22:07:33 template.go:131: template: theme/partials/drawer.html:39:18: executing "theme/partials/drawer.html" at <len .Site.Menus.main>: error calling len: len of untyped nil in theme/partials/drawer.html
ERROR: 2016/09/08 22:07:33 template.go:131: template: theme/partials/drawer.html:39:18: executing "theme/partials/drawer.html" at <len .Site.Menus.main>: error calling len: len of untyped nil in theme/partials/drawer.html
ERROR: 2016/09/08 22:07:33 template.go:131: template: theme/partials/drawer.html:39:18: executing "theme/partials/drawer.html" at <len .Site.Menus.main>: error calling len: len of untyped nil in theme/partials/drawer.html
ERROR: 2016/09/08 22:07:33 template.go:131: template: theme/partials/drawer.html:39:18: executing "theme/partials/drawer.html" at <len .Site.Menus.main>: error calling len: len of untyped nil in theme/partials/drawer.html
ERROR: 2016/09/08 22:07:33 template.go:131: template: theme/partials/drawer.html:39:18: executing "theme/partials/drawer.html" at <len .Site.Menus.main>: error calling len: len of untyped nil in theme/partials/drawer.html
0 draft content
0 future content
5 pages created
1 non-page files copied
0 paginator pages created
2 tags created
1 categories created
in 40 ms
me@home:~/texte/sites-web/mysite$

What do you think of that?

Thanks by advance.

Solved. The right solution is below. This is documented in the Menu page doc.

menu:
  main:
    - name: "Material"
      url: "/"
      weight: 0
    - name: "Getting started"
      url: "getting-started/"
      weight: 10
    - name: "Adding content"
      url: "adding-content/"
      weight: 20
    - name: "Roadmap"
      url: "roadmap/"
      weight: 30
    - name: "License"
      url: "license/"
      weight: 40
2 Likes