Add the Allinaa chatbot to GitHub Pages and static sites

Written by the Allinaa team · Updated

A static site has no admin panel, which makes this the shortest guide of all: the Allinaa line goes into the HTML, you commit, you push, and the host publishes the new files. The only question is where in the repository the line belongs, and that depends on whether the site is plain files or built by a generator.

Where the line goes

How the site is builtWhere to paste the line
Plain HTML files in the repositoryIn every page, on the line before the closing body tag.
Jekyll (GitHub Pages' default generator)Once, in the layout that every page extends, before the closing body tag.
Hugo, Eleventy, Astro or another generatorOnce, in the base layout or template that wraps every page.
A documentation generator with a themeIn the theme's footer partial or the "custom scripts" setting the theme offers, if it has one.

Put the tag in the template, not in a Markdown content file: many generators escape raw HTML in content, and the line would show as text.

Get your code

Your code is in your Allinaa cabinet: step 5 of the setup wizard, or the "Website installation" card on the Overview (sign up at bot.allinaa.com/start if you have no account yet). It looks like this, with your own bot id:

<script src="https://bot.allinaa.com/widget.js" data-bot-id="your-bot-id" defer></script>

Step by step

  1. Open the layout file (or each HTML file) in your editor and paste the line just before the closing body tag. Keep the defer attribute and the data-bot-id value as they are.
  2. Build locally if your generator supports it and open a page to see the button.
  3. Commit and push. GitHub Pages, Netlify, Vercel and similar hosts publish the site again from the repository.
  4. Open the published site in a private window; a CDN in front of the site may serve the old page for a while.

A public repository is fine

The line holds the address of the Allinaa script, your public bot id and the defer attribute: no password, key or token. It can be pasted into a shared code box, e-mailed or shown to anyone.

So the line can live in a public repository. If your site sends a Content Security Policy, allow scripts from and requests to https://bot.allinaa.com; the browser console names the blocked rule otherwise.

Single-page apps

A site that is one HTML file with routes handled in JavaScript needs the line once; the assistant follows route changes and knows which page the visitor is viewing. Framework specifics are in the React and Next.js guide.

Check the installation

Check from both sides. As a visitor: open the live site in a private window, look for the button in a bottom corner and open a second page, so you know it is not limited to one. From Allinaa: click Check my site in the cabinet; it reads your homepage and up to two linked pages and answers found, not found or unreachable. The status also turns to installed by itself the first time the assistant loads on a page of your site.

For the general causes, see the troubleshooting page; for hand-coded sites on ordinary hosting, the HTML guide.

Frequently asked questions

Where does the line go in a Jekyll site?

In the layout every page extends, before the closing body tag, so it is added to every page at build time.

Can I put the line in a Markdown page?

Better not: generators often escape raw HTML in content. Use the layout or template.

Is it safe in a public repository?

Yes. The line holds the script address and your public bot id, no key or token.

Why does the published site still not show the button after a push?

The host or its CDN may serve the old page for a while; open the site in a private window a little later.

Try Allinaa free for 14 days

200 AI replies, no card. After the trial, activation is arranged with Allinaa: Standard is $350/month and Premium $800/month, with no setup fee.

Questions? E-mail info@allinaa.com. AI answers can be wrong; each business approves the information its assistant uses.