header: add title attribute to menus

This commit is contained in:
Aditya Telange 2020-12-13 20:17:01 +05:30
parent 73de54e4bc
commit 153740bbac
No known key found for this signature in database
GPG Key ID: 82E844EF3DA99E77

View File

@ -112,7 +112,7 @@
{{- $menu_item_url := (cond (strings.HasSuffix .URL "/") .URL (printf "%s/" .URL) ) | absLangURL }}
{{- $page_url:= $currentPage.Permalink | absLangURL }}
<li>
<a href="{{ .URL | absLangURL }}">
<a href="{{ .URL | absLangURL }}" title="{{ .Title | default .Name }}" class="{{ with .Params.class }}{{ . }}{{ end }}">
<span {{- if eq $menu_item_url $page_url }} class="active" {{- end }}>
{{ .Name }}
</span>