Add an AI support assistant to a Docusaurus site
Docs built with Docusaurus are already structured for answers — headings, versioned routes, a sitemap. The assistant reads what you already wrote.
- One JS file
- About two minutes
- No config in your app
// matterchat.js — one file: init, then load the widgetwindow.MatterChat = window.MatterChat || { q: [] };window.MatterChat.q.push(["init", { id: "bot_your_key" }]); var s = document.createElement("script");s.src = "https://app.matterchat.co/widget.js";s.async = true;document.body.appendChild(s);js · save as its own file
The route through your admin
- static/js/matterchat.js
- docusaurus.config.js
- scripts
The snippet lands in static/js/matterchat.js.
One file, one config line
Create static/js/matterchat.js with the init-and-load snippet, add "/js/matterchat.js" to the scripts array in docusaurus.config.js, and rebuild. The file is served from your own site; no plugin, no React component, nothing in your dependency tree.
- static/js/matterchat.js
- Docusaurus copies static/ to the site root, so the file ships with your build.
- scripts: ["/js/matterchat.js"]
- One entry in docusaurus.config.js puts it on every page, docs and blog alike.
- Survives version bumps
- No plugin API involved, so Docusaurus major upgrades have nothing to break.
Save the file under static/js/, then add "/js/matterchat.js" to the scripts array in docusaurus.config.js. Config changes need a rebuild — docusaurus build — before they appear.
What the crawler sees on Docusaurus
Docusaurus builds static HTML for every route and emits a sitemap by default, so the crawler reads complete pages with their headings intact — the structure your docs already have is the structure the answers cite.
Answers that cite the page
Every answer links the doc it came from, so the assistant is a faster route into the docs rather than a replacement for them. When the docs do not cover a question, the assistant says so — and the unanswered list becomes your docs backlog.
Checking it actually worked
Four things, in order. The third is the one people skip, and it is the one that tells you whether the answers are grounded.
- 1Hard refresh the page — the launcher appears bottom-right.
- 2Ask it something your site answers, and check the reply cites a page.
- 3Ask it something your site does not cover, and check it declines.
- 4Open Conversations in the dashboard; both should be there.
On a different stack?
The snippet is the same everywhere. Only the place you paste it changes.
What Docusaurus users ask
Short answers. If yours is not here, the assistant on this page will try it — and tell you honestly if it cannot.
Does this replace Algolia DocSearch?
They coexist. Search finds pages whose words the reader already knows; the assistant answers questions in the reader's phrasing and cites the page. Many sites run both.
Will it work with versioned docs?
Yes. Crawl the version path you want answers drawn from — usually the latest — so citations land on current pages rather than an archived version.
Does it add weight to my bundle?
No. The one local file queues the init and loads the widget asynchronously at runtime; your webpack/rspack build output is unchanged.
From the blog
All posts- BuildingDomain locks and why “works on localhost” isn’t enoughDomain allowlists exist so your bot answers only where you installed it. Testing on localhost proves the script loads; it does not prove production embeds are locked down.Read
- EvaluatingThe best AI chatbot for a Webflow site, compared honestly (2026)Matter Chat, Social Intents, Ultimo Bots, Chatling, WeblyChat and Chatbase on a Webflow site: Apps marketplace or custom code, the paid-site-plan gate, CMS coverage, citations, handoff and pricing. Checked on the vendors' own pages.Read
- BuildingWhat to index first when your site is a messStart with the pages that already resolve real support questions. Noise, archives, and unfinished docs can wait — indexing them first makes answers worse.Read
Answer honestly. Capture the rest.
Point Matter Chat at your site and see what it can — and can't — answer. It's honest about both.
No credit card. 2 minute setup.
Every answer cites the source it came from. When there isn't one, it says so — and hands the visitor to you.
Installs on the tools you already run.