docusaurus-search-local

Offline, local full-text search plugin/theme for Docusaurus v2/v3

Library
npm
v0.55.3
901 stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum. How we score it →
67 /100 Good
Development Activity 40
Maintenance 68
Community 60
Maturity 60
Momentum 40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation. How we score it →
75 /100 Good
Architecture 74
Code Quality 78
Innovation 68
Learning Curve 80

docusaurus-search-local is a Docusaurus plugin and theme that adds full-text search entirely client-side, with no external search service (no Algolia account, no hosted index) required. It builds a search index at build time and ships it with the static site, then provides a search UI theme component powered by lunr/autocomplete.js.

Originally forked from cmfcmf/docusaurus-search-local, it was fully rewritten in TypeScript by easyops-cn with expanded language support, particularly optimized tokenization for Chinese (zh), plus test coverage and CI. It has become the standard offline-search choice for Docusaurus sites that want indexed search without depending on a third-party hosted service.

What You Get

  • Build-time search index generation covering docs, blog, and standalone pages
  • A drop-in autocomplete search UI theme with keyboard navigation
  • Multi-language tokenization, including a dedicated Chinese-language (zh) tokenizer
  • No dependency on a hosted search service — the index ships with the static build
  • Optional ‘Ask AI’ integration hook for AI-powered answer assistance

Common Use Cases

  • Adding search to a self-hosted Docusaurus documentation site without an Algolia account
  • Serving documentation to a primarily Chinese-speaking audience with correctly tokenized search
  • Air-gapped or internal documentation portals that can’t call out to third-party search APIs
  • Small-to-medium docs sites where a hosted search service is unnecessary overhead

Under The Hood

Architecture - The package is split into a server half (src/server/index.ts) that hooks Docusaurus’s plugin lifecycle to crawl generated HTML and build a Lunr-based search index at build time, and a client half (src/client/theme) that swaps in a themed search bar component consuming that prebuilt index via autocomplete.js, with src/shared holding the tokenizer/trimmer logic shared between both halves.

Tech Stack - Written in TypeScript with three parallel tsc build targets (client/server/types), depends on Docusaurus’s own @docusaurus/* utility packages (v2/v3 peer-compatible), @easyops-cn/autocomplete.js for the UI widget, @node-rs/jieba for Chinese word segmentation, cheerio for HTML parsing during index generation, and Lunr for the underlying search index.

Code Quality - 29 .spec.ts test files sit alongside their source modules (e.g. generateTrimmer.spec.ts, lunrLanguageZh.spec.ts), run via Jest with Coveralls coverage reporting in CI; the repo also ships two example Docusaurus sites (website/, website-multi-docs/) used both as live demos and as integration-test fixtures for the plugin.

API Design - Integration is a single plugin/theme pair added to docusaurus.config.js with a typed options object (declared in src/shared/interfaces.ts) covering indexing scope, language, and UI options; because it mirrors Docusaurus’s own plugin/theme convention, existing Docusaurus users face almost no new concepts to learn beyond the plugin’s specific option keys.

Used by 6 apps in this directory

TypeScript
95%
MIT

Actual

Invoicing Finance

29,186

Local-first personal finance with envelope budgeting, end-to-end encryption, and multi-device sync — no subscription required.

View details
93
Repo Health
85
Technical
73
Dependency
Built with
TypeScript 95%
Updated 1 weeks ago
Python
70%
Apache 2.0

GPT Researcher

AI Assistants · Productivity

29,650

The pioneering open-source autonomous AI agent that conducts deep, multi-source research and produces citation-backed reports exceeding 2,000 words — faster and more reliably than any human researcher.

View details
91
Repo Health
91
Technical
63
Dependency
Built with
Python 70%
TypeScript 18%
Updated 1 weeks ago
Rust
37%
Other

Hook0

Devops

1,491

Open-source Webhooks-as-a-Service: deliver events to your users with auto-retry, signed payloads, and a real-time subscriber dashboard — all without building the infrastructure yourself.

View details
82
Repo Health
82
Technical
69
Dependency
Built with
Rust 37%
TypeScript 12%
Updated 2 weeks ago
Python
69%
MIT

Langflow

AI Agents · AI Development

155,319

Build, test, and deploy AI agents and RAG workflows visually with native API and MCP server export.

View details
90
Repo Health
85
Technical
65
Dependency
Built with
Python 69%
TypeScript 22%
Updated 1 weeks ago
HTML
36%

OpenPanel

Devops · Hosting Control Panel

749

Docker-powered web hosting control panel that gives every user a fully isolated environment with dedicated web server, database, and networking — VPS-grade security on shared hardware.

View details
84
Repo Health
75
Technical
63
Dependency
Built with
HTML 36%
Go 32%
TypeScript 23%
Updated 1 weeks ago
Go
86%
Apache 2.0

Uncloud

Devops

5,503

Deploy and scale containerised apps across any servers without Kubernetes or Swarm overhead

View details
84
Repo Health
78
Technical
67
Dependency
Built with
Go 86%
Updated 1 weeks ago

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers