Lektor Plugin
Add the Asyntai AI chat assistant to your Lektor site
Overview
Lektor is a Python static content management system with a built-in admin panel. The Asyntai plugin adds the chat assistant to your Lektor site. Install it, add your widget ID, build the site, 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
- Lektor 3.3 or later, including the 3.4 releases
- An Asyntai account. The Free plan is enough to try the widget
Installation
Follow these steps to add Asyntai to your Lektor 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_.
Add the Plugin
Run this command in your project folder:
lektor plugins add lektor-ai-chatbot
Add Your Widget ID
Create the file configs/ai-chatbot.ini in your project with this line:
widget_id = asyntai_1a2b3c4d5e6f
Build the Site
Run lektor build and deploy, or preview with lektor server. Open your site and the chat bubble is in the corner of every page.
Options
All options go in configs/ai-chatbot.ini.
| Option | Default | What it does |
|---|---|---|
widget_id | required | Your Asyntai widget ID |
enable_on_server | true | Set it to false to keep the widget off the site during lektor server |
script_url | the Asyntai CDN | Advanced. Load the widget from another URL |
A missing or malformed widget_id stops the build with a message that says how to fix it.
How It Works
The plugin adds one async script tag to every HTML page Lektor builds, just before </body>. That includes child pages, paginated pages and your 404 page. Your own content always renders first.
No templates are changed. Feeds, sitemaps, CSS and images stay as they are. Changes you make in the Lektor admin panel keep the widget on the next build.
Answering From Your Content
Asyntai reads your published pages. Add your site URL in the dashboard, and the assistant answers from the same pages the widget sits on. You can also add documents, and question and answer pairs.
Tip: Set enable_on_server = false while you work on the site. The widget then shows up only on the site you build and deploy.
Removing It
Run lektor plugins remove lektor-ai-chatbot and build 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].