Install the script

Install on Astro (and other static site generators)

In Astro, put the line in the layout every page uses. The same idea works for Next.js, Hugo, Eleventy, Jekyll and other generators: one shared layout, one line.

Steps

  1. In your AskAI dashboard, open Install on your website and copy your script line. It already contains your own site key.
  2. Open your base layout, for example src/layouts/Base.astro.
  3. Paste the line just before </body> and add is:inline to the script tag so Astro leaves it as it is.
  4. Build and deploy your site.
  5. Open the live site and check that the AskAI button appears. It also works with client-side navigation.
  6. Back in your dashboard, press Check installation. When it says the line was found, the assistant starts learning your website.

Updated November 1, 2026. Menus in website builders change from time to time; if a step looks different, look for “custom code” or “code injection”.