Packages
Docsense is a small monorepo of packages. Most Docusaurus sites only need the plugin.
| Package | Install when | Responsibility |
|---|---|---|
docusaurus-plugin-docsense | Always for Docusaurus | Index on build, SearchBar theme, plugin options |
@docsense/runtime | Custom UI or Node scripts | DocsenseClient that loads the JSON index and runs search() |
@docsense/indexer | Custom pipelines | Parse Markdown/MDX and serialize the index |
@docsense/core | Custom engines or tests | Tokenization, ranking, and pure search(index, options) |
Runtime client (advanced)โ
import { DocsenseClient } from '@docsense/runtime';
const client = new DocsenseClient({
indexUrl: '/docsense/search-index.json',
});
const result = await client.search({ query: 'install plugin', limit: 8 });
Licenseโ
MIT. Source: github.com/meharshit/docsense.
Next stepsโ
- Install Docsense - Use the plugin on a Docusaurus site.
- How Docsense works - How the packages fit together at build and runtime.
- Plugin options - Configuration reference.
- Support - Report issues and follow the project.