This is an automated email from the ASF dual-hosted git repository.

tuhaihe pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/cloudberry-site.git


The following commit(s) were added to refs/heads/main by this push:
     new 2b1910ee07 Feature: add kapa.ai Ask AI assistant to the site
2b1910ee07 is described below

commit 2b1910ee0758db0a954c96ba0b81510aa905bf69
Author: Dianjin Wang <[email protected]>
AuthorDate: Mon Sep 28 11:02:14 2026 +0800

    Feature: add kapa.ai Ask AI assistant to the site
    
    Embed the kapa.ai website widget via the Docusaurus `scripts` option,
    adding an "Ask AI" button on every page that answers questions from
    the Apache Cloudberry documentation.
    
    To follow the ASF privacy policy, the widget sets no tracking cookie,
    uses hCaptcha instead of Google reCAPTCHA for bot protection, and
    shows a consent screen before the first question is sent, similar to
    what the Apache Doris website does.
    
    See: Issue#401 <https://github.com/apache/cloudberry-site/issues/401>
    
    Assisted-by: Claude Code
---
 docusaurus.config.ts | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)

diff --git a/docusaurus.config.ts b/docusaurus.config.ts
index 701c2922b3..d4f325aeb5 100644
--- a/docusaurus.config.ts
+++ b/docusaurus.config.ts
@@ -3,6 +3,7 @@ import type { Config } from "@docusaurus/types";
 import { themes as prismThemes } from "prism-react-renderer";
 
 import markdownExportRegistry from "./src/plugins/markdown-export/registry";
+
 const config: Config = {
   title: "Apache Cloudberry (Incubating)",
   tagline: "One advanced and mature open-source MPP (Massively Parallel 
Processing) database. Open source alternative to Greenplum Database.",
@@ -69,6 +70,32 @@ const config: Config = {
     ],
   ],
 
+  // "Ask AI" assistant from kapa.ai, answering questions from the docs.
+  // Sources, allowed domains and the Website ID below (public, not a secret)
+  // are managed in the Kapa dashboard. For the ASF privacy policy the widget
+  // sets no tracking cookie, uses hCaptcha instead of Google reCAPTCHA, and
+  // asks for consent before the first question is sent.
+  scripts: [
+    {
+      src: "https://widget.kapa.ai/kapa-widget.bundle.js";,
+      "data-website-id": "9d55c09f-0362-44eb-a3bf-37ba3c12d572",
+      "data-project-name": "Apache Cloudberry",
+      "data-project-color": "#ff5900",
+      "data-project-logo": "https://cloudberry.apache.org/img/favicon.ico";,
+      "data-modal-title": "Apache Cloudberry AI Assistant",
+      "data-modal-disclaimer":
+        "Answers are generated by AI from the [Apache Cloudberry 
documentation](https://cloudberry.apache.org/docs/) and may be inaccurate. 
Please verify important details against the docs.",
+      "data-modal-example-questions":
+        "How do I install Apache Cloudberry?,How is Cloudberry different from 
Greenplum?,How do I load data with gpfdist?",
+      "data-user-analytics-cookie-enabled": "false",
+      "data-bot-protection-mechanism": "hcaptcha",
+      "data-consent-required": "true",
+      "data-consent-screen-disclaimer":
+        "By clicking &quot;I agree, let's chat&quot;, you consent to the use 
of the AI assistant in accordance with kapa.ai's [Privacy 
Policy](https://www.kapa.ai/content/privacy-policy). This service uses 
hCaptcha, which is subject to hCaptcha's [Privacy 
Policy](https://www.hcaptcha.com/privacy) and [Terms of 
Service](https://www.hcaptcha.com/terms).",
+      async: true,
+    },
+  ],
+
   presets: [
     [
       "classic",


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to