From 6c83df566c2a8be51985808fd1fd18bdc84e7d00 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Fri, 18 Dec 2020 21:46:07 +0530 Subject: [PATCH] header: add accesskey (Alt + /) for search in menu - Alt + /: jumps to search page if in menu --- layouts/partials/header.html | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/layouts/partials/header.html b/layouts/partials/header.html index 2b037f71..503f0abe 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -111,10 +111,12 @@ {{- 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` }}