.js file in your docs folder on every page. You add the widget with one small file.
Before you start
- Your website widget. Kelu makes one for you when you create a knowledge base. Its Install tab shows these steps with your widget id and key already in the code.
- Your docs site on the widget’s Sites it works on list (Install tab).
- Custom JavaScript on your Mintlify plan. It is a paid Mintlify feature.
Add the widget
Paste the loader
Mintlify has no place for a script tag, so the file adds the tag itself:Replace
kelu-widget.js
YOUR_WIDGET_ID and kl_pk_... with the values from your widget’s snippet.Check it works
Open any page. A round icon button appears in the bottom-right corner, with the tooltip Ask AI. Ask a question and check that the answer lists its Sources. Nothing there? See Troubleshooting.Replace Mintlify’s search
Turn on Replace my site’s search on the widget’s Search & opening tab, and Kelu takes over Mintlify’s search. No change tokelu-widget.js is needed.
To set it in the file instead, add this line before document.head.appendChild(s):
kelu-widget.js
- The search box in the top bar opens Kelu on the Search tab. So does the search icon on phones.
- Cmd+K (Ctrl+K on Windows and Linux) opens Kelu on the Search tab too.
- Mintlify’s own search dialog no longer opens.