header: use .KeyName for accesskey search
in menu - .Name doesn't work with emojis - .URL doesn't work with url such as 'search/'
This commit is contained in:
parent
6c83df566c
commit
b4933eadd6
|
@ -111,7 +111,7 @@
|
||||||
{{- range .Site.Menus.main }}
|
{{- range .Site.Menus.main }}
|
||||||
{{- $menu_item_url := (cond (strings.HasSuffix .URL "/") .URL (printf "%s/" .URL) ) | absLangURL }}
|
{{- $menu_item_url := (cond (strings.HasSuffix .URL "/") .URL (printf "%s/" .URL) ) | absLangURL }}
|
||||||
{{- $page_url:= $currentPage.Permalink | absLangURL }}
|
{{- $page_url:= $currentPage.Permalink | absLangURL }}
|
||||||
{{- $is_search := eq ($.Site.GetPage .Name).Layout `search` }}
|
{{- $is_search := eq ($.Site.GetPage .KeyName).Layout `search` }}
|
||||||
<li>
|
<li>
|
||||||
<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 ) }}>
|
||||||
|
|
Loading…
Reference in New Issue