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",
{
cloud: {
indexId: "YOUR_ORAMACLOUD_INDEX_ID", // This is your index ID
oramaCloudAPIKey: process.env.PRIVATE_API_KEY, // This is your Private API key. Keep it safe!
deploy: process.env.ENABLE_ORAMACLOUD_DEPLOY, // true or false. Enables deploy while building/starting
},
},
],
];

Configuration

You can get the variables required for the plugin’s configuration in your Orama Cloud dashboard, right after creating a new index. All fields are required.

NameTypeDescription
indexIdstringThe ID of the index you want to connect to.
oramaCloudAPIKeystringYour Private API key. Keep it safe!
deploybooleanEnables the plugin to deploy the index while building/starting your project.

Creating an index

  1. Go to your dashboard and click on “Native Integrations”.

    Then, click on the Docusaurus logo to create a new index.

  2. As soon as you click on “Create index”, Orama Cloud will give you all the variables you need to set up the plugin.

    Docusaurus variables shown on Orama Cloud
  3. Now you can set up the plugin on your Docusaurus project.

    Please refer to the Usage section above for the plugin configuration.

    Once you configured your docusaurus.config.js file, Orama will update the index with the data from your Docusaurus project at build time.

    The plugin will also automatically install the Orama searchbox on your documentation, so there’s no need to add it manually!

  4. Congrats! 🎉 You just connected your Docusaurus project to Orama Cloud.