Hexo Integration
Add the Asyntai AI chat assistant to your Hexo site
Overview
Hexo is a fast blog and website framework built on Node.js. The Asyntai integration is a Hexo plugin. Install it, add your widget ID to _config.yml, and the chat bubble is on every page.
The assistant answers your visitors from your own content, in more than 80 languages, day and night.
Requirements
- Hexo 5 or later
- Node 18 or later
- An Asyntai account. The Free plan is enough to try the widget
Installation
Follow these steps to add Asyntai to your Hexo site:
Get Your Widget ID
Sign in to Asyntai and open the Install page. The widget ID is the value of data-asyntai-id in the snippet shown there. It starts with asyntai_.
Install the Plugin
Run this command in your Hexo site folder:
npm install hexo-ai-chatbot
Hexo loads the plugin by itself. You do not add it to a plugin list.
Set the Widget ID
Open _config.yml in your site folder and add an asyntai block at the end:
asyntai:
widget_id: asyntai_1a2b3c4d5e6f
Build the Site
Run hexo clean and then hexo generate, and publish as usual. Open your site and the chat bubble is in the corner of every page.
Options
| Option | Type | Default | What it does |
|---|---|---|---|
widget_id | string | required | Your Asyntai widget ID |
enable_in_server | boolean | true | Set it to false to keep the widget off the site during hexo server |
script_url | string | the Asyntai CDN | Advanced. Load the widget from another URL |
A missing or malformed widget_id stops hexo generate with a message that says how to fix it.
How It Works
The plugin uses the Hexo injector to add the Asyntai loader just before the closing body tag of every page: posts, pages, archives, categories and tags. It works with every Hexo theme.
The loader waits for the page's load event, so your own content always renders first.
Answering From Your Content
Asyntai reads your published pages. Add your site URL in the dashboard, and the assistant answers from the same posts and pages the widget sits on. You can also add documents, and question and answer pairs.
Tip: Set enable_in_server: false while you write. The widget then shows up only on the generated site.
Removing It
Run npm uninstall hexo-ai-chatbot, delete the asyntai block from _config.yml, and generate the site again. The chat bubble is gone.
Plans & Pricing
The plugin is free. View pricing.
Need Help?
If you have any questions or run into issues, contact us at [email protected].