Ask AI assistant widget for Paligo
Add an AI assistant or AI search widget to your Paligo documentation using Biel.ai's web components. You can also connect AI agents through MCP, with or without installing the widget.
Prerequisites
- A Biel.ai account.
- A project with indexed content.
- A Paligo account with HTML5 output capability.
- Access to your Paligo publication settings to add custom JavaScript.
Add the assistant widget

-
Log in to your Paligo account and open your publication.
-
Create a local
biel.jsfile, or add the following code to the custom JavaScript file already used by your layout:(function() {var link = document.createElement('link');link.rel = 'stylesheet';link.href = 'https://cdn.jsdelivr.net/npm/biel-search/dist/biel-search/biel-search.css';document.head.appendChild(link);var script = document.createElement('script');script.type = 'module';script.src = 'https://cdn.jsdelivr.net/npm/biel-search/dist/biel-search/biel-search.esm.js';document.head.appendChild(script);script.onload = function() {var button = document.createElement('biel-button');button.setAttribute('project', '<YOUR_PROJECT_ID>');button.setAttribute('header-title', 'Biel.ai assistant');button.setAttribute('button-position', 'bottom-right');button.setAttribute('modal-position', 'bottom-right');button.setAttribute('button-style', 'dark');button.textContent = 'Ask AI';document.body.appendChild(button);};})();Replace
<YOUR_PROJECT_ID>with your project's ID from the Biel.ai dashboard. -
In Paligo, select Layout, open your HTML5 layout, and choose CSS, JS, logos and other assets. Under Custom Javascript, click Upload and select the
.jsfile, then click Save. See Paligo's JavaScript guide.A layout accepts one custom JavaScript file. If it already has one, extend that file rather than replacing its existing functionality.
-
Publish using the modified layout and verify the assistant on the generated pages.
Add the search widget
Add a Search button at the top right of your documentation:
-
Open your HTML5 layout’s custom JavaScript file in Paligo. Add the following code. If you already load the widget assets, keep a single copy of those asset lines:
(() => {if (document.getElementById('biel-site-search')) return;const stylesheet = document.createElement('link');stylesheet.rel = 'stylesheet';stylesheet.href = 'https://cdn.jsdelivr.net/npm/biel-search/dist/biel-search/biel-search.css';document.head.appendChild(stylesheet);const script = document.createElement('script');script.type = 'module';script.src = 'https://cdn.jsdelivr.net/npm/biel-search/dist/biel-search/biel-search.esm.js';document.head.appendChild(script);const button = document.createElement('biel-search-button');button.id = 'biel-site-search';button.setAttribute('project', '<YOUR_PROJECT_ID>');button.setAttribute('button-style', 'rounded');button.textContent = 'Search';button.style.cssText = 'position:fixed;top:1rem;right:1rem;z-index:1000';document.body.appendChild(button);})(); -
Replace
<YOUR_PROJECT_ID>with your project ID. Adjusttopandrightif the button overlaps your navigation. -
Save the file, upload it under Layout > CSS, JS, logos and other assets > Custom Javascript, and publish with that layout. Open Search, enter a documentation term, and open a result.
Alternative: modify published HTML
If you host and postprocess the exported HTML yourself, add the widget to the generated files:
-
Open the generated HTML files in your exported output.
-
Add the initialization scripts to each page's head section:
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/biel-search/dist/biel-search/biel-search.css"><script type="module" src="https://cdn.jsdelivr.net/npm/biel-search/dist/biel-search/biel-search.esm.js"></script> -
Add the widget code before the closing body tag:
<biel-button project="<YOUR_PROJECT_ID>"header-title="Biel.ai assistant"button-position="bottom-right"modal-position="bottom-right"button-style="dark">Ask AI</biel-button> -
Publish the modified output. Repeat this postprocessing after each Paligo export, since new output replaces the generated files.
Troubleshooting
Custom JavaScript not working
- Verify your Paligo plan includes custom JavaScript features
- Check that the JavaScript file is uploaded to the layout used for publication
- Review browser console for any JavaScript errors
Assistant not appearing
- Ensure both the CSS and JavaScript modules are loading (check Network tab)
- Verify your project ID is correct
- Clear your browser cache and reload the page
Styling conflicts with Paligo themes
- Paligo's built-in themes may have conflicting styles
- Try adjusting the
button-positionattribute (e.g.,center-right,bottom-left) - See the customization section for style overrides
Assistant appearing on some pages but not others
- Ensure every publication uses the layout with the uploaded JavaScript
- Verify all pages are being regenerated when you publish
Connect AI agents with MCP
Let AI tools search and read your indexed documentation. MCP is available on every plan and during your trial.
- In the Biel.ai dashboard, open your project’s Settings > MCP.
- Select Enable MCP server and click Save.
- In the widget, open Connect via MCP using the
<>button. Select your AI client or choose MCP URL to copy the endpoint into its settings.
Without the widget: after enabling MCP, copy MCP endpoint from Settings > MCP and add it to your AI client. No widget installation or website changes are required.
The widget also exposes WebMCP tools to compatible browser agents visiting your site. Use the latest widget release and keep Enable WebMCP selected in Settings > MCP.
Next steps
- Customize the widget's appearance, behavior, and tone.
- Connect integrations like GitHub Actions, MCP, or Zapier.