Add AI Chat to your Docusaurus docs
What is Docusaurus
Docusaurus is an open-source documentation platform powered by MDX and React.
Get an API key
Follow these steps to create an API key for your web integration.
Install the Inkeep plugin
Define the widget
Аdd the chat button as a plugin in your docusaurus.config.js
file:
Сonfiguration settings
You have two configuration options:
- Configure the widget in the plugin
options
. - Configure the widget in standalone
config
.
Configure the widget in the plugin options
Docusaurus plugins can accept a tuple of [pluginName, options]
.
In this case, the plugin name is @inkeep/cxkit-docusaurus
.
So use like this:
You will need to replace REPLACE_WITH_YOUR_INKEEP_API_KEY
with your actual Inkeep API key in the code below.
Configure the widget in standalone config
In this case, the plugin name is @inkeep/cxkit-docusaurus/chatButton
.
What this means is that you create a config file in your project. By default, you can create an inkeep.config.js
or inkeep.config.ts
file in the root of your project, and inkeep will automatically pick it up.
You can customize the path to the config file in the plugin options:
We also export a fully typed defineConfig
function that you can use to create your config:
For a full list of customizations, check out the Common Settings.