Docusaurus Integration
Add the Asyntai chat assistant to your Docusaurus documentation site with one plugin
ภาพรวม
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.
วิธีการทำงาน
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.
ข้อกำหนด
- บัญชี Asyntai การสมัครไม่มีค่าใช้จ่าย และแพ็กเกจฟรีก็เพียงพอสำหรับทดลองใช้หน้าต่างแชท
- A Docusaurus site, version 2 or 3
- Node.js 18 or newer, which Docusaurus already needs
การติดตั้ง
Follow these steps to add Asyntai to your Docusaurus site:
ติดตั้งปลั๊กอิน
Run this command in the folder that holds your Docusaurus site.
npm install docusaurus-plugin-asyntai
คัดลอกรหัสหน้าต่างของคุณ
เปิดหน้าติดตั้งในแดชบอร์ด Asyntai ของคุณ รหัสหน้าต่างคือค่าของ data-asyntai-id ในโค้ดที่แสดงอยู่ตรงนั้น
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
เคล็ดลับ: ก่อนเผยแพร่ ให้เพิ่มเอกสาร คำถามคำตอบ และคำสั่งของคุณใน แดชบอร์ด Asyntai เพื่อให้ผู้ช่วยตอบได้ถูกต้องตั้งแต่ผู้เข้าชมคนแรก
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.
ตัวเลือก
- 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.
วิธีเอาออก
Delete the plugin entry from docusaurus.config.js and build the site again. The widget is gone.
ความเป็นส่วนตัว
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. นโยบายความเป็นส่วนตัว.
แพ็กเกจและราคา
ปลั๊กอินนี้ฟรี และหน้าต่างแชทใช้ได้กับทุกแพ็กเกจของ Asyntai รวมถึงแพ็กเกจฟรี แต่ละแพ็กเกจมีจำนวนข้อความต่อเดือน ซึ่งใช้ร่วมกันระหว่างหน้าต่างบนเว็บไซต์และการเชื่อมต่อทั้งหมดของคุณ แพ็กเกจแบบเสียเงินเพิ่มจำนวนนี้ ดูราคา.
ต้องการความช่วยเหลือ?
หากคุณมีคำถามหรือพบปัญหา ติดต่อเราได้ที่ [email protected].