Add `pre` and `post` menu params

so that icons can be added via external scripts (ex. fontawesome)

fixes: #420

ref: https://gohugo.io/content-management/menus/#params
This commit is contained in:
Aditya Telange 2021-06-11 19:06:50 +05:30
parent d35056c664
commit 5c26fda276
No known key found for this signature in database
GPG Key ID: 82E844EF3DA99E77
1 changed files with 2 additions and 0 deletions

View File

@ -148,7 +148,9 @@
<a href="{{ .URL | absLangURL }}" title="{{ .Title | default .Name }} {{- cond $is_search (" (Alt + /)" | safeHTMLAttr) ("" | safeHTMLAttr ) }}" <a href="{{ .URL | absLangURL }}" title="{{ .Title | default .Name }} {{- cond $is_search (" (Alt + /)" | safeHTMLAttr) ("" | safeHTMLAttr ) }}"
{{- cond $is_search (" accesskey=/" | safeHTMLAttr) ("" | safeHTMLAttr ) }}> {{- cond $is_search (" accesskey=/" | safeHTMLAttr) ("" | safeHTMLAttr ) }}>
<span {{- if eq $menu_item_url $page_url }} class="active" {{- end }}> <span {{- if eq $menu_item_url $page_url }} class="active" {{- end }}>
{{- .Pre }}
{{- .Name -}} {{- .Name -}}
{{ .Post -}}
</span> </span>
</a> </a>
</li> </li>