Plugins
DocSearch Plugin
Integrate Algolia DocSearch for advanced search
The DocSearch plugin integrates Algolia DocSearch into your documentation site, replacing the default Pagefind search with Algolia’s AI-powered search.
Installation
pnpm add @barodoc/plugin-docsearch@latest
Prerequisites
Apply for DocSearch at docsearch.algolia.com. You will receive an appId, apiKey, and indexName after approval.
Configuration
{
"plugins": [
["@barodoc/plugin-docsearch", {
"appId": "YOUR_APP_ID",
"apiKey": "YOUR_SEARCH_API_KEY",
"indexName": "your_index_name"
}]
]
}
When enabled, the DocSearch plugin automatically disables the default Pagefind search and replaces it with the Algolia search modal.
Options
appIdstringrequiredAlgolia application ID
apiKeystringrequiredAlgolia search-only API key (not the admin key)
indexNamestringrequiredAlgolia index name
containerstringCSS selector for the search container element. Default: "#docsearch"
placeholderstringPlaceholder text for the search input. Default: "Search docs..."