kube icon indicating copy to clipboard operation
kube copied to clipboard

No Permalink field when defining menu.extra

Open cbui opened this issue 6 years ago • 0 comments

I'm getting this error: "theme/partials/header.html" at <.Permalink>: can't evaluate field Permalink in type *hugolib.MenuEntry

When trying to utilize the extra nav:

[[menu.extra]]
    name = "Contact"
    permalink = "something"

Looks like Hugo doesn't support the permalink field?

Switching it in the theme's header.html from

            <a href="{{ .Permalink }}">{{ .Name }}</a>

to

            <a href="{{ .URL }}">{{ .Name }}</a>

to match the main menu nav works.

I'm super new to Hugo so I'm not sure if that's the actual correct fix or not. But if you want a PR for it I can make it.

cbui avatar Jul 14 '18 18:07 cbui