Introducing the Docusaurus plugin

Introducing the Docusaurus plugin

Markprompt chatbots are increasingly being used in documentation sites, in order to make it easy for users to ask questions to docs. Docusaurus is a popular way to build documentation sites, as it abstracts away technicalities, so that writers can focus on content and not on setup.

With the newly released @markprompt/docusaurus-theme-search plugin, it is possible to include a chatbot with just a couple of lines of code.

To get started, install the plugin via NPM:

1npm install @markprompt/docusaurus-theme-search

and enable the plugin the in your docusaurus.config.js:

1const config = {
2  // …
4  themes: [
5    // …
6    '@markprompt/docusaurus-theme-search',
7  ],
9  themeConfig:
10    {
11      markprompt: {
12        projectKey: 'YOUR-MARKPROMPT-KEY',
13      },
14    },

That's it! Now, a chatbot icon will appear at the bottom right of your site, enabling users to ask questions to your docs.

Note that if your Docusaurus project already has a search plugin, such as theme-search-algolia, you need to swizzle the current search plugin, and add Markprompt as a standalone component. This is straightforward to do, and we explain how to do it here: Markprompt with swizzling

You can read more about the Docusaurus plugin on the GitHub repository for the project, or in the Markprompt docs.