How do you add multiple entries to a menu from a section's front matter?

I have a menu named “main” in my config and I’m trying to add additional entries to it from the a section’s front matter.

The documentation shows how to add a single entry which works like so:

---
title: test
menu:
  main:
      name: "foo"
      url: /foo
---

I may have missed it, but I can’t find any examples of defining multiple entries.

I might expect multiple entries to look like the following, but this results in an error:

menu:
  main:
    - name: "foo"
      url: /foo
    - name: "bar"
      url: /foo
ERROR 2018/09/08 10:17:41 unable to process menus for "test": unable to cast []interface {}{map[string]interface {}{"name":"foo", "url":"/foo"}, map[string]interface {}{"url":"/foo", "name":"bar"}} of type []interface {} to map[string]interface{}

From the Front Matter you can only add the given page to a menu.

From the config.yaml file though, you can add as many as you want though it’s generaly used to adding external link or internal link toward Front-Matter-less page.
See here

I see. From the front matter, you can add entries to multiple menus but you can’t add multiple entries to one menu.

Thanks for the clarification!