I was wondering if it is possible to add custom meta data to menu entries… Well, not exactly wondering, I tried and failed:
[[menu.main]]
name = "44"
weight = 250
identifier = "fourtyfour"
url = "https://fourtyfour.space"
pre = "<i class='fas fa-unicorn fa-fw'></i>"
target = "_blank"
Only this one single menu entry has the target key.
In the templates then I though it might be possible to run with it like this:
<a href="{{.URL}}" class="nav-link" target="{{ .Target }}">{{ .Pre }} {{ .Name }}</a>
But it’s not working and throwing a 5 exception error tantrum (about “can’t evaluate field Target in type *navigation.MenuEntry”).
Is there really no way to add custom information to menu entries via config.toml? How would you try to implement this “feature” (some menu links open new windows, not all)?