A feature-rich client side fuzzy search module

Hi, I want to share a search module I created, which was decoupled from my theme, and the UI was inspired by Algolia DocSearch.

Currently, the module provides the following features, you could request one if you’re interested in it. :smiley:

  • Fast: the demo site built with 10k posts (~30k pages), see also the GitHub Pages workflow.
  • Modes: single search page and modal (auto complete).
  • Fuzzy search by title, summary, headings and content (disabled by default).
  • Flexible and configurable.
  • Built-in responsive, theme-less UI and interactive logic.
  • Allow restyling the UI with CSS variables.
  • Pagination: load more when scrolling to the bottom of results.
  • Highlighting matches.
  • Statistic: the number of search results, search time.
  • Results navigation: and to navigate, to select.
  • Filters: filterable by language.
  • Sorting: sortable by score and date.
  • Internationalization (i18n).
  • Multilingual search: searchable from single language or all languages.
  • Lightweight.
  • Configurable shortcuts.
  • Excluding pages by setting the noindex page parameter as true.
  • RTL languages support: experimental.

Is it possible to change the keyboard shortcuts? I’ve got Ctrl+K mapped to clone tabs

1 Like

Yes, it’s possible, there is a parameter called search.shortcut_search (default to ["Control", "k"]) for this.

There are other parameters can be tweaked.

Available on latest change (main branch).


Thank you!

1 Like

I wonder if there is a feature such as opening the search on a page instead of instantly.

1 Like

The module support the single search page mode now.

Unfortunately, this feature is not available yet, although I have reserved the corresponding format. There is an issue Single search page · Issue #42 · razonyang/hugo-mod-search · GitHub about this, comment or subscribe that issue if you’re interested. :smiley: