Skip to main content

Packages

Docsense is a small monorepo of packages. Most Docusaurus sites only need the plugin.

PackageInstall whenResponsibility
docusaurus-plugin-docsenseAlways for DocusaurusIndex on build, SearchBar theme, plugin options
@docsense/runtimeCustom UI or Node scriptsDocsenseClient that loads the JSON index and runs search()
@docsense/indexerCustom pipelinesParse Markdown/MDX and serialize the index
@docsense/coreCustom engines or testsTokenization, 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โ€‹