Docusaurus Plugin
The docusaurus plugin allows you to index the content of your Docusaurus websites and offer text search to your visitors. This plugin can be used in OSS mode where you host the documents, or in cloud mode where your data will be stored by us and you will have access to analytics where you can see the number of queries and much more.
Pre-requisites
In order guarantee a correct functionality of the plugin, you need to have the @docusaurus/core
at least in the version 3.2.0
.
Installation
You can install the plugin using any major Node.js package manager.
Usage
With Orama OSS
Add the plugin to your docusaurus.config.js
:
And that’s it, you now have a search that will update whenever you build your site.
With Orama Cloud
If you want to use Orama Cloud as the source so you can have access to analytics for free you need a couple more variables:
Make sure you use the correct deploy configuration. Failure to do so will result in compilation failure. see DelopyType.
To get this variables first create a new integration for HTTP Integrations in here:
And then docusaurus:
On the next page you will see all the variables you need to get you up and running:
And you are set, if you set deploy to true your index will update whenever you build the website and there are changes to your pages.