Browse Source

refactor(layouts/partials): add link typing for search menu item

re #74, re #122
Josh Habdas 6 months ago
parent
commit
5d360e59d9
Signed by: Josh Habdas <jhabdas@protonmail.com> GPG Key ID: B148B31154C75A74
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      layouts/partials/components/navmenu.html

+ 1
- 1
layouts/partials/components/navmenu.html View File

@@ -4,7 +4,7 @@
4 4
     {{ range .entries }}
5 5
       {{ $is_active := or ($.page.IsMenuCurrent $.name .) ($.page.HasMenuCurrent $.name .) }}
6 6
       {{ if (not (in $.settings.exclude .Identifier)) }}
7
-        <a itemprop="url"{{ if $is_active }} class="active"{{ end }} href="{{ .URL }}">{{ if .Pre }}{{ .Pre | safeHTML }} {{ end }}{{ .Name }}{{ if .Post }} {{ .Post | safeHTML }}{{ end }}</a>
7
+        <a itemprop="url"{{ if $is_active }} class="active"{{ end }}{{ if eq .Identifier "search" }} rel="search"{{ end }} href="{{ .URL }}">{{ if .Pre }}{{ .Pre | safeHTML }} {{ end }}{{ .Name }}{{ if .Post }} {{ .Post | safeHTML }}{{ end }}</a>
8 8
       {{ end }}
9 9
     {{ end }}
10 10
   </nav>

Loading…
Cancel
Save