Skip to content

Commit

Permalink
Add DocSearch-specific meta tag
Browse files Browse the repository at this point in the history
  • Loading branch information
johndmulhausen committed Feb 1, 2025
1 parent 12e2511 commit b941911
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions layouts/partials/hooks/head-end.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{{- $currentPage := . -}}
{{- range site.Menus.main -}}
{{- if $currentPage.IsMenuCurrent .Menu . -}}
<meta name="docsearch:section" content="{{ .Name }}">
{{- else if $currentPage.HasMenuCurrent .Menu . -}}
<meta name="docsearch:section" content="{{ .Name }}">
{{- end -}}
{{- end -}}

0 comments on commit b941911

Please sign in to comment.