Skip to content

feat(search): migrate from @orama/plugin-docusaurus-v3 to @easyops-cn/docusaurus-search-local#437

Merged
ilteoood merged 2 commits into
mainfrom
feature/migrate-orama-to-docusaurus-search-local
Jun 5, 2026
Merged

feat(search): migrate from @orama/plugin-docusaurus-v3 to @easyops-cn/docusaurus-search-local#437
ilteoood merged 2 commits into
mainfrom
feature/migrate-orama-to-docusaurus-search-local

Conversation

@ilteoood
Copy link
Copy Markdown
Contributor

@ilteoood ilteoood commented Jun 3, 2026

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-package patch to keep search working on /docs and 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.2
  • docusaurus.config.js
    • Move the search entry from plugins to themes, because the new package overrides the default SearchBar via the theme slot
    • Configure with hashed: true, language: 'en' (single locale), indexBlog: false (blog disabled in this project), docsRouteBasePath: '/docs', and highlightSearchTermsOnTargetPage: true
  • package-lock.json — regenerated by npm install

Verification

  • npm run lint — passes (format, JS, style)
  • docusaurus.config.js — loads cleanly, new theme is registered, no orama references remain
  • npm run build — config + theme/plugin load phase runs through successfully

Notes

  • The existing .navbar__search-input CSS rule in src/css/custom.css still applies — the new theme renders an input with the same class on the search bar.
  • No patch-package is required, so the .npmrc ignore-scripts=true continues to be safe.

Closes #420

…/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`
@ilteoood ilteoood force-pushed the feature/migrate-orama-to-docusaurus-search-local branch from f2ca739 to f3801d3 Compare June 3, 2026 17:31
@ilteoood ilteoood force-pushed the feature/migrate-orama-to-docusaurus-search-local branch from b9741e9 to f3801d3 Compare June 3, 2026 18:05
@mcollina
Copy link
Copy Markdown
Member

mcollina commented Jun 4, 2026

The build is failing?

@ilteoood
Copy link
Copy Markdown
Contributor Author

ilteoood commented Jun 4, 2026

The build is failing?

Yes @mcollina , I'm handling the fail in this new PR: #438

Copy link
Copy Markdown
Contributor

@Puppo Puppo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@ilteoood ilteoood enabled auto-merge (squash) June 4, 2026 21:39
Copy link
Copy Markdown
Member

@Eomm Eomm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

checked few options, but this is the most used offline search atm

@ilteoood ilteoood merged commit 9072b67 into main Jun 5, 2026
5 checks passed
@ilteoood ilteoood deleted the feature/migrate-orama-to-docusaurus-search-local branch June 5, 2026 07:32
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.

OramaSearch is completely broken

5 participants