Content adapters: create menu entry with properties

I’m trying to create menu entries with properties using a content adapter, and I’m not sure if this is currently possible.

I saw that @jmooring opened issue #12507 for menu entry support within content adapters, and this does work for flat menu entries. For example, what would be this in front matter:

menus: main

Is this within a content adapter:

{{ .AddPage (dict "menus" "main" [...]) }}

And similarly for multiple simple menu entries using a slice of strings instead of a single string.

But I’m trying to create the equivalent of this in front matter within a content adapter:

menus:
  main:
    parent: main-page
    identifier: example-id

I expected that passing a map would work:

{{- $mainMenu := dict 
    "parent" "main-page"
    "identifier" "example-id"
-}}
{{- $menus := dict "main" $mainMenu -}}
{{- .AddPage (dict "menus" $menus [...]) -}}

But it seems that when menu support was added to content adapters in 245928a / v0.126.2, menus were defined as an array of strings.

Is it possible to create menu entries with properties within a content adapter? If so, how? If not, is this by design (maybe I’m missing a conceptual reason why this shouldn’t be possible) or is this a plausible feature to request?

Thank you!

This is a plausible feature to request.

Thank you for your response. I’ve opened Support creating menu entries with properties within content adapters · Issue #13384 · gohugoio/hugo · GitHub accordingly.

Is there any workaround for this currently?

Not that I can think of.