refactor(fastsearch): improve search initialization and result rendering

- refactored search index loading to use async/await for better readability
- improved result rendering logic to handle empty results and focus management
- added debounce to search input for performance optimization
- defined default options for Fuse.js to streamline configuration
This commit is contained in:
Aditya Telange
2026-05-02 19:15:38 +05:30
parent e457685198
commit 8af442a6a7
2 changed files with 182 additions and 144 deletions
+1 -1
View File
@@ -21,7 +21,7 @@
</header>
<div id="searchbox" class="searchbox">
<input id="searchInput" autofocus placeholder="{{ .Params.placeholder | default (printf "%s " .Title) }}"
<input id="searchInput" disabled placeholder="{{ .Params.placeholder | default (printf "%s " .Title) }}"
aria-label="search" type="search" autocomplete="off" maxlength="64">
<ul id="searchResults" class="searchResults" aria-label="search results"></ul>
</div>