diff options
| author | Aditya Telange <21258296+adityatelange@users.noreply.github.com> | 2020-12-18 22:50:04 +0530 |
|---|---|---|
| committer | Aditya Telange <21258296+adityatelange@users.noreply.github.com> | 2020-12-18 22:50:04 +0530 |
| commit | b4933eadd65f922cad20e5f9da68ef645564ebfe (patch) | |
| tree | 35b4d312e96ab99820dae852dab6c3e1ccea331c | |
| parent | 6c83df566c2a8be51985808fd1fd18bdc84e7d00 (diff) | |
header: use .KeyName for accesskey search
in menu
- .Name doesn't work with emojis
- .URL doesn't work with url such as 'search/'
| -rw-r--r-- | layouts/partials/header.html | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/layouts/partials/header.html b/layouts/partials/header.html index 503f0ab..51773ed 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -111,7 +111,7 @@ {{- range .Site.Menus.main }} {{- $menu_item_url := (cond (strings.HasSuffix .URL "/") .URL (printf "%s/" .URL) ) | absLangURL }} {{- $page_url:= $currentPage.Permalink | absLangURL }} - {{- $is_search := eq ($.Site.GetPage .Name).Layout `search` }} + {{- $is_search := eq ($.Site.GetPage .KeyName).Layout `search` }} <li> <a href="{{ .URL | absLangURL }}" title="{{ .Title | default .Name }} {{- cond $is_search (" (Alt + /)" | safeHTMLAttr) ("" | safeHTMLAttr ) }}" {{- cond $is_search (" accesskey=/" | safeHTMLAttr) ("" | safeHTMLAttr ) }}> |
