Docusaurus Integration
Add the Asyntai chat assistant to your Docusaurus documentation site with one plugin
Tổng quan
Docusaurus turns your Markdown files into a documentation website. The Asyntai plugin adds the chat assistant to every page it builds, so readers can ask a question instead of searching. You add one line to your configuration file and nothing else.
Cách hoạt động
The plugin adds one script tag after the body of every generated page. The tag is marked async, so your documentation renders first and the widget loads after it. Nothing else about your site changes.
Yêu cầu
- Một tài khoản Asyntai. Tạo tài khoản miễn phí, và gói miễn phí đủ để thử khung trò chuyện.
- A Docusaurus site, version 2 or 3
- Node.js 18 or newer, which Docusaurus already needs
Cài đặt
Follow these steps to add Asyntai to your Docusaurus site:
Cài tiện ích
Run this command in the folder that holds your Docusaurus site.
npm install docusaurus-plugin-asyntai
Sao chép mã khung của bạn
Mở trang Cài đặt trong bảng điều khiển Asyntai. Mã khung là giá trị của data-asyntai-id trong đoạn mã hiển thị ở đó.
data-asyntai-id="asyntai_xxxxxxxxxxxx"
Add It to Your Configuration
Open docusaurus.config.js and add the plugin with your widget ID.
plugins: [
['docusaurus-plugin-asyntai', {widgetId: 'asyntai_xxxxxxxxxxxx'}],
],
Build Your Site
Run your usual build command and publish the site. The chat bubble is on every page.
npm run build
Mẹo: Trước khi xuất bản, hãy thêm tài liệu, phần hỏi đáp và hướng dẫn của bạn trong bảng điều khiển Asyntai, để trợ lý trả lời đúng ngay từ khách truy cập đầu tiên.
Answering From Your Documentation
Asyntai reads your published pages. Add your site address in the dashboard, and the assistant answers from the same documentation the widget sits on. You can add extra documents and question and answer pairs as well.
Tùy chọn
- widgetId sets which Asyntai account answers. It is required, and a wrong value stops the build with a clear message.
- enableInDevelopment set to false keeps the widget off the site while you run the local development server.
- scriptUrl loads the widget from another address. Most sites never need this.
Cách gỡ bỏ
Delete the plugin entry from docusaurus.config.js and build the site again. The widget is gone.
Quyền riêng tư
The plugin sends no data on its own. Asyntai receives data only when a visitor opens the chat and writes a message, exactly as it would with a snippet pasted by hand. Chính sách quyền riêng tư.
Gói dịch vụ và giá
Tiện ích miễn phí, và khung trò chuyện hoạt động với mọi gói Asyntai, kể cả gói miễn phí. Mỗi gói gồm một số tin nhắn hằng tháng, dùng chung cho khung trên trang web và mọi tích hợp của bạn. Các gói trả phí nâng con số đó lên. Xem bảng giá.
Cần Trợ giúp?
Nếu bạn có bất kỳ câu hỏi nào hoặc gặp vấn đề, hãy liên hệ chúng tôi tại [email protected].