Add optional title and class to menu items.

This commit is contained in:
tastytea 2021-07-11 21:41:11 +02:00
parent 9ef05f0c16
commit 0a10286c19
Signed by: tastytea
GPG Key ID: CFC39497F1B26E07
1 changed files with 2 additions and 2 deletions

View File

@ -9,8 +9,8 @@
{{- $curr := . }}
{{- range .Site.Menus.main }}
{{- if .URL }}
<li>
<a href="{{ .URL }}">{{ .Name }}</a>
<li{{ with .Params.class }} class="{{ . }}"{{ end }}>
<a href="{{ .URL }}"{{ with .Title }} title="{{ . }}"{{ end }}>{{ .Name }}</a>
</li>
{{- else }}
{{ .Name }}