I’m unable to highlight the active top level menu item having configured permalinks in the config.
With the following config:
[permalinks]
blog = "/:section/:year/:month/:slug/"
pages = "/:title"
[menu]
[[menu.main]]
name = "Home"
identifier = "home"
url = "/"
weight = 10
[[menu.main]]
name = "Blog"
identifier = "blog"
url = "/blog/"
weight = 20
[[menu.main]]
name = "About"
identifier = "about"
url = "/about/"
weight = 30
And with the following lazy blogger code to highlight the menus:
{{ $currentPage := . }}
{{ range .Site.Menus.main }}
<li class='menu-item{{if or ($currentPage.IsMenuCurrent "main" .) ($currentPage.HasMenuCurrent "main" .) }} current-menu-item{{end}}'>
<a title="{{ .Name }}" href="{{ .URL }}">{{ .Name }}</a>
</li>
{{ end }}
Only the home
menu (and blog
if I’m at the path /blog
) are highlighted. Is this a known problem or am I likely to have misconfigured something?