Add site search powered by Fuse.js

This commit is contained in:
James Panther
2022-01-13 15:56:30 +11:00
parent e9c8a4a049
commit adaa7b757e
29 changed files with 1169 additions and 457 deletions
+13
View File
@@ -42,6 +42,19 @@
>
</li>
{{ end }}
{{ if .Site.Params.enableSearch | default false }}
<li
class="ltr:text-right rtl:text-left ltr:sm:mr-7 ltr:sm:last:mr-0 rtl:sm:ml-7 rtl:sm:last:ml-0"
>
<button
id="search-button"
class="text-base hover:text-neutral-600 dark:hover:text-neutral-300"
title="{{ i18n "search.open_button_title" }}"
>
{{ partial "icon.html" "search" }}
</button>
</li>
{{ end }}
</ul>
</nav>
{{ end }}