- Home
- AI chatbot for GitHub Pages
AI chatbot for GitHub Pages, with no server to run
GitHub Pages serves files and nothing more. That is why it is free and simple, and also why it cannot run a chat by itself. This guide shows how to add an AI assistant that answers your visitors from your own pages, with one script in your layout and one push.
- 50 AI replies per month free
- No backend
- No credit card
How do you add an AI chatbot to GitHub Pages?
You add a hosted chat widget. The chat runs on Asyntai, and your repository holds one script tag, so your site stays static. The setup has three steps:
- Create a free account and add your github.io address or your custom domain.
- Paste the script before the closing body tag in your shared layout, for example
_layouts/default.htmlon Jekyll. - Commit and push. GitHub Pages publishes the change, and the chat button shows on every page.
How can a static site answer its visitors?
A GitHub Pages site has no server side, so every way to answer a question must live somewhere else. These are the three setups that people use most, and what each one means for you and for your visitors.
| Contact form servicea form that sends email | Link to GitHub Issuesor Discussions | Hosted AI chatbotfor example Asyntai | |
|---|---|---|---|
| When the visitor gets an answer | When you read the email and reply. | When a maintainer or another user replies. | At once, on the page they are reading. |
| Who can ask | Anyone with an email address. | People with a GitHub account. The question is public. | Any visitor, with no account. |
| What it knows | Nothing. You write each reply. | What the person who replies knows. | Your published pages, files and instructions. |
| What goes in the repo | A form with the service's endpoint. | A link. | One script tag with a public widget ID. |
| What you learn | Only the messages people send. | The open threads. | Every question in your chat logs. |
Contact form service
- When the visitor gets an answer
- When you read the email and reply.
- Who can ask
- Anyone with an email address.
- What it knows
- Nothing. You write each reply.
- What goes in the repo
- A form with the service's endpoint.
- What you learn
- Only the messages people send.
Link to GitHub Issues or Discussions
- When the visitor gets an answer
- When a maintainer or another user replies.
- Who can ask
- People with a GitHub account. The question is public.
- What it knows
- What the person who replies knows.
- What goes in the repo
- A link.
- What you learn
- The open threads.
Hosted AI chatbot, for example Asyntai
- When the visitor gets an answer
- At once, on the page they are reading.
- Who can ask
- Any visitor, with no account.
- What it knows
- Your published pages, files and instructions.
- What goes in the repo
- One script tag with a public widget ID.
- What you learn
- Every question in your chat logs.
The options work well together. Keep the form for long requests and Issues for bug reports, and let the chatbot take the questions your pages already answer. The Asyntai GitHub App can also answer questions in Issues and Discussions from the same content.
How to add the chatbot in four steps
You need one script and one commit. Everything else, such as colors, the greeting and the instructions, lives in the Asyntai dashboard, so later changes need no new push.
- 01
Add your site address
Sign up and enter the address your visitors use:
username.github.io, a project path such asusername.github.io/project, or your custom domain. - 02
Check the answers
Asyntai reads your published pages. Ask a few test questions in the dashboard, and add files or text for facts that are not on the site.
- 03
Paste the script in your layout
Put it before the closing body tag in the template that every page uses. On a plain HTML site, add it to each page.
- 04
Commit and push
GitHub Pages builds and publishes as usual. Open your site, and the chat button is in the corner of every page.
<script src="https://widget.asyntai.com/static/js/chat-widget.js" data-asyntai-id="your-site-id" async></script>
The dashboard gives you this code with your own site ID. It is safe in a public repository: the ID is public, and the script holds no password or key. See the HTML installation guide for the general steps.
Which file to edit for your site generator
The script only has to be in the final HTML, so it works with any generator. What changes is the file you put it in.
Jekyll, classic build
Default on GitHub PagesOpen _layouts/default.html (or the layout your theme uses) and paste the script before </body>. If you use a remote theme, copy its default layout into your own _layouts folder first, then add the script. See the Jekyll guide.
Jekyll, Actions build
With the Ruby gemThe jekyll-ai-chatbot gem adds the script to every page and reads your widget ID from _config.yml. The classic GitHub Pages build only runs its own approved plugins, so set Settings, Pages, Source to GitHub Actions and use the Jekyll workflow. The Jekyll plugin docs show each step.
Hugo
Built with ActionsAdd the script to layouts/_default/baseof.html before the closing body tag, or put it in a partial and include it there. The Hugo guide has the details.
Docs tools
MkDocs, DocusaurusDocumentation sites are a common use for GitHub Pages. Follow the MkDocs guide or the Docusaurus guide to place the script in the theme or the site config.
Plain HTML
No generatorWith hand-written pages there is no shared layout, so paste the script into each HTML file before </body>. A site with many pages is a good reason to move to a generator with one layout.
Where the chatbot gets its answers
For each question, Asyntai finds the parts of your content that fit and writes the reply from them. The crawl reads the published site, so it sees the same pages as your visitors.
Website crawl
Your published pages, found through the links of your site.
Single URLs
Add one page, for example a new release note or a talk page.
PDF files
Papers, slides and manuals. Scanned PDFs work too.
Spreadsheets
CSV or Excel, one entry per row: a schedule, a list of options.
Plain text
Facts that are not on the site, such as your support email.
HTML files
Saved pages and HTML documents.
Videos
A demo or a recorded talk, answered from its transcript.
Real-Time Data Feed
Connect live data, such as availability or prices.
Standard and ProYour custom instructions set the tone and the rules, for example "For bug reports, send people to the Issues tab". Read the knowledge base guide for each source.
How to keep answers in sync with your repository
When you push new content, GitHub Pages publishes it as usual. The chatbot needs the new text too. You can do this by hand or as part of your workflow.
New crawl
All plansAfter a bigger update, start a new crawl in the dashboard. For one new page, add its URL as a single entry.
Knowledge Sync action
Starter and upThe Asyntai Knowledge Sync action runs in your workflow on each push. It sends new and changed Markdown files to your knowledge base and leaves unchanged files alone. It uses the Asyntai API, with your key stored as a repository secret.
GitHub App
All plansThe same knowledge base can answer in your repository. The GitHub App replies to new Discussions in a Q&A category and to Issues with the label you choose.
Chat logs
All plansRead the questions people ask on your site. A question that comes back often is a sign that a page is missing or hard to find.
What visitors ask on GitHub Pages sites
Not every GitHub Pages site is documentation. These are three common kinds of site, each with an answer from content the owner published or added.
Answer from the Schedule page and a plain text note.
Answer from the About page and an instruction.
Answer from the Data page and a PDF of the paper.
Plans and prices
Each project site counts as its own website with its own knowledge base. Most personal and project sites start on the free plan.
Free
$0 /month- 50 AI replies per month
- 1 website
- Chat logs
Starter
$39 /month- 800 AI replies per month
- 2 websites
- REST API and analytics
Standard
$139 /month- 15,000 AI replies per month
- 3 websites
- Knowledge gaps
Pro
$449 /month- 50,000 AI replies per month
- 20 websites
- Remove branding
See every feature on the pricing page.
Questions about chatbots on GitHub Pages
Can I add a chatbot to a GitHub Pages site?
Yes. GitHub Pages serves plain HTML, so a script tag works there. The chat runs on Asyntai, and your site only loads one script. Your deployment stays a normal commit and push.
Do I need a server or a backend?
No. Your site stays static on GitHub Pages. Asyntai hosts the chat, stores the conversations and writes the answers, so there is nothing to run on your side.
Where do I paste the script?
Before the closing body tag in the layout that every page uses. On a Jekyll site that is usually _layouts/default.html, on Hugo it is layouts/_default/baseof.html. On a plain HTML site, add it to each page.
Is it safe to commit the script to a public repository?
Yes. The script holds only your public widget ID, which any visitor can see in your page source anyway. It holds no password and no secret key. Your login, content and instructions stay in the Asyntai dashboard.
Can I use the Jekyll plugin on GitHub Pages?
Yes, when GitHub Actions builds your site. The classic GitHub Pages build only runs its own approved plugins. Set the Pages source to GitHub Actions with the Jekyll workflow, and the jekyll-ai-chatbot gem works like on any other host.
Does it work with a custom domain?
Yes. The script works the same on a github.io address and on your own domain. Add the address that your visitors use when you set up the website in Asyntai.
Are my project sites separate chatbots?
Yes. Asyntai treats username.github.io/first-project and username.github.io/second-project as two websites, each with its own content and instructions. The free plan includes 1 website, Starter 2, Standard 3 and Pro 20.
How does the chatbot learn about new pages I push?
Start a new crawl in the dashboard, or add the new page as a single URL. On Starter and up, the Knowledge Sync action can send changed Markdown files to your knowledge base on every push.
Is there a free plan?
Yes. The free plan includes 50 AI replies per month on 1 website, with no credit card. Paid plans start at $39 per month.
GitHub and GitHub Pages are trademarks of GitHub, Inc. Asyntai is an independent product and is not affiliated with GitHub.
Give your static site a chat that answers
Start on the free plan with 50 AI replies per month. Add your site, test the answers, then push one script.