1
0
mirror of https://github.com/alanorth/hugo-theme-bootstrap4-blog.git synced 2024-12-19 09:02:18 +01:00

Commit cbd7140 introduced the use of .Title but menu entries don't have such an attribute.

This fix uses also .Name for the link title.
This commit is contained in:
Frank Tegtmeyer 2018-04-28 16:34:43 +02:00
parent 8f0b2d7b7d
commit 693ccbb5e2

View File

@ -39,7 +39,7 @@
{{- $currentPage := . -}} {{- $currentPage := . -}}
{{ range .Site.Menus.navbar }} {{ range .Site.Menus.navbar }}
{{ $menuURL := .URL | absLangURL }} {{ $menuURL := .URL | absLangURL }}
<a class="nav-link{{ if or ($currentPage.IsMenuCurrent "navbar" .) ($currentPage.HasMenuCurrent "navbar" .) }} active{{end}}" href="{{ .URL }}" title="{{ .Title }}">{{ .Name }}</a> <a class="nav-link{{ if or ($currentPage.IsMenuCurrent "navbar" .) ($currentPage.HasMenuCurrent "navbar" .) }} active{{end}}" href="{{ .URL }}" title="{{ .Name }}">{{ .Name }}</a>
{{ end }} {{ end }}
</nav> </nav>
</div> </div>