Back to Dashboard

Documentation

Learn how to use Asyntai

Bridgetown Plugin

Add the Asyntai AI chat assistant to your Bridgetown site

Create Account

Overview

Bridgetown is a Ruby static site generator. The Asyntai plugin is a Ruby gem. Add it to your site, 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

  • Bridgetown 1.2 or later, including 2.x
  • An Asyntai account. The Free plan is enough to try the widget

Installation

Follow these steps to add Asyntai to your Bridgetown site:

1

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_.

2

Add the Gem

Run this command in your project folder:

bundle add bridgetown-ai-chatbot
3

Add the Plugin

Open config/initializers.rb and add the plugin with your widget ID:

Bridgetown.configure do |config|
  init :"bridgetown-ai-chatbot", widget_id: "asyntai_1a2b3c4d5e6f"
end

You can also use the block form:

init :"bridgetown-ai-chatbot" do
  widget_id "asyntai_1a2b3c4d5e6f"
end
4

Build the Site

Run bin/bridgetown deploy or bin/bridgetown build and publish. Open your site and the chat bubble is in the corner of every page.

Options

OptionTypeDefaultWhat it does
widget_idstringrequiredYour Asyntai widget ID
enable_in_developmentbooleantrueSet it to false to keep the widget off the site while BRIDGETOWN_ENV is development
script_urlstringthe Asyntai CDNAdvanced. 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 the Asyntai loader to every HTML page your site builds, just before </body>. That includes pages, posts, collections and pagination. The loader waits for the page's load event, so your own content always renders first.

It works with every template engine: ERB, Serbea and Liquid. Feeds, JSON and other non-HTML files stay as they are.

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_in_development: false while you work on the site. The widget then shows up only on the production build.

Removing It

Delete the init line and build again. The chat bubble is gone.

Plans & Pricing

The gem is free. View pricing.

Need Help?

If you have any questions or run into issues, contact us at [email protected].