Skip to content

Connect to Docusaurus

Installation

You can install the plugin using any major Node.js package manager.

Terminal window
npm install @orama/plugin-docusaurus-v3

Usage

To use the plugin you will need to add it to your Docusaurus list of plugins. You can do this by adding the following code to your docusaurus.config.js file:

docusaurus.config.js
plugins: ["@orama/plugin-docusaurus-v3"];

Configuration

Orama Plugins

Under the plugins Orama configuration object you can add some of the following plugins:

Analytics

Simply add the following code to your docusaurus.config.js file:

docusaurus.config.js
plugins: [
[
"@orama/plugin-docusaurus-v3",
{
plugins: {
analytics: {
enabled: true,
apiKey: process.env.ORAMA_ANALYTICS_API_KEY,
indexId: process.env.ORAMA_ANALYTICS_INDEX_ID,
},
},
},
],
];

For more information about the props you can use on the analytics plugin, check the Analytics plugin section.

Searchbox & Search Button

This plugin uses the Orama Searchbox for the search functionality. You pass props to the searchbox and/or the search button component by adding the following code to your docusaurus.config.js file:

docusaurus.config.js
plugins: [
[
"@orama/plugin-docusaurus-v3",
{
searchbox: {
placeholder: "Search...",
}
searchButton: {
text: "Click here to search..."
}
},
],
];

For more information about the props you can use on the searchbox, check the Searchbox section and the Search Button section.