Skip to content

Conversation

@gandie
Copy link
Contributor

@gandie gandie commented Jan 7, 2026

Might help resolving #172

@gandie
Copy link
Contributor Author

gandie commented Jan 9, 2026

I think this is quite fine for now. Switched plugin due to annoying warning in @cmfcmf/docusaurus-search-local, now using docusaurus-lunr-search which works silently out of the box. I've added some styling to custom.css in order to show how to customize and style the search bar and results.

As i am not the greatest frontend dev any help on further beautification would be much appreciated.

Further improvements:

  • Mobile search bar: Did not find an easy way to integrate search bar on small screen, so i've just hidden the searchbar on small screens to avoid ugly overlapping layouts. Better way might be to move search bar into mobile navigation menu, though i was not able to achieve that ... yet 😉
  • Better styling: Tried to apply stuff already found in custom stylesheet, but i am very sure that can be done even better, especially for people more familiar with corporate identity and stuff, picking correct colors for the elements shown
  • Placeholder in search bar for keyboard shortcut is not yet translated
  • Fine tune config: How many suggestions to show? How to weight search hits ( e.g. put more weight on chapter headings, ... ) ? Pages to exclude? ... This would greatly profit from user feedback imo, so i don't have to guess preferences.

Nice bonus feature ( i found after styling ... ): Search bar can be used via Keyboard shortcut! I love that, as i can now search docs without my fingers leaving the keyboard.

Some demo screenshots:

New searchbar in top right corner hinting keyboard shortcut:

Screenshot from 2026-01-09 10-18-29

Open search bar with suggestions:

Screenshot from 2026-01-09 10-30-19

@gandie gandie marked this pull request as ready for review January 9, 2026 09:42
@gandie gandie force-pushed the feat/local-search-plugin branch from 964d548 to 6e32938 Compare January 9, 2026 09:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants