feat(search): migrate from @orama/plugin-docusaurus-v3 to @easyops-cn/docusaurus-search-local#437
Merged
Conversation
…/docusaurus-search-local Replaces the orama Docusaurus plugin (which required patches to keep search working on the /docs route) with the local-search theme, which generates a statically-built lunr index at build time and serves it client-side. - Swap dependency in package.json - Move the search entry from `plugins` to `themes`, since the new package overrides the default SearchBar via the theme slot - Configure with `hashed: true`, `language: 'en'` (single locale), `indexBlog: false` (blog is disabled here), `docsRouteBasePath: '/docs'` and `highlightSearchTermsOnTargetPage: true`
f2ca739 to
f3801d3
Compare
b9741e9 to
f3801d3
Compare
Tony133
approved these changes
Jun 4, 2026
Member
|
The build is failing? |
Contributor
Author
Tony133
approved these changes
Jun 4, 2026
Eomm
approved these changes
Jun 5, 2026
Member
Eomm
left a comment
There was a problem hiding this comment.
checked few options, but this is the most used offline search atm
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replaces the Orama search plugin with
@easyops-cn/docusaurus-search-local.The Orama Docusaurus v3 plugin has been a maintenance liability: it requires a
patch-packagepatch to keep search working on/docsand a custom resolution of@orama/react-components(see #361). The new plugin is a self-contained theme that builds a static lunr index at build time, with no patches or external services required.Changes
package.json— drop@orama/plugin-docusaurus-v3@^3.1.18, add@easyops-cn/docusaurus-search-local@^0.55.2docusaurus.config.jspluginstothemes, because the new package overrides the defaultSearchBarvia the theme slothashed: true,language: 'en'(single locale),indexBlog: false(blog disabled in this project),docsRouteBasePath: '/docs', andhighlightSearchTermsOnTargetPage: truepackage-lock.json— regenerated bynpm installVerification
npm run lint— passes (format, JS, style)docusaurus.config.js— loads cleanly, new theme is registered, no orama references remainnpm run build— config + theme/plugin load phase runs through successfullyNotes
.navbar__search-inputCSS rule insrc/css/custom.cssstill applies — the new theme renders an input with the same class on the search bar..npmrcignore-scripts=truecontinues to be safe.Closes #420