I might be missing the source you are referring to. The documentation you linked seems to only discuss .IsMenuCurrent
and .HasMenuCurrent
with respect to sections and not single pages. The documentation for .IsMenuCurrent
does not suggest that the behavior is different for sections rather than single pages. I should also note that the following code produces the same result I described above:
<nav class="navbar" role="navigation">
<div class="navbar-end">
{{ $currentPage := . }}
{{ range .Site.Menus.main }}
<a class="navbar-item{{ if or ($currentPage.HasMenuCurrent "main" .) ($currentPage.IsMenuCurrent "main" .) }} is-active{{ end }}" href="{{ .URL | relURL }}">
{{ .Name }}
</a>
{{ end }}
</div>
</nav>