diff options
author | Chen Xianmin <xianmin12@gmail.com> | 2022-09-06 15:25:56 +0300 |
---|---|---|
committer | Chen Xianmin <xianmin12@gmail.com> | 2022-09-06 15:25:56 +0300 |
commit | 942f9d91bfdb94f4ee2699c7525ef582c0a7f79e (patch) | |
tree | af41dbaba46958e9ec6b37f07bd7e8e8126ee125 /layouts | |
parent | f5d49e7bd8b727729e9e692a9cd0a1cff45b9e2d (diff) |
fix: menu active
see: https://github.com/gohugoio/hugo/issues/9150#issuecomment-965798975
Diffstat (limited to 'layouts')
-rw-r--r-- | layouts/partials/header.html | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/layouts/partials/header.html b/layouts/partials/header.html index 0895ca2..f9e1d97 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -12,7 +12,7 @@ <ul id="menu" class="menu"> {{ $currentPage := . }} {{ range .Site.Menus.main }} - <li class="menu-item{{if or ($currentPage.IsMenuCurrent "main" .) ($currentPage.HasMenuCurrent "main" .) }} active{{end}}"> + <li class="menu-item{{ if $currentPage.IsMenuCurrent "main" . }} active{{end}}"> {{ if .HasChildren }} <!-- drop down navigation MENU --> <a class="menu-item-link menu-parent" href="{{ .URL | absLangURL | safeURL }}">{{ .Name }}</a> |