You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by cr...@apache.org on 2026/01/16 03:46:25 UTC

(iotdb-docs) branch feat_kapa_i18n created (now 700f6141)

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

critas pushed a change to branch feat_kapa_i18n
in repository https://gitbox.apache.org/repos/asf/iotdb-docs.git


      at 700f6141 Add Kapa AI widget configuration to support multi-language and user consent functionality.

This branch includes the following new commits:

     new 700f6141 Add Kapa AI widget configuration to support multi-language and user consent functionality.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



(iotdb-docs) 01/01: Add Kapa AI widget configuration to support multi-language and user consent functionality.

Posted by cr...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

critas pushed a commit to branch feat_kapa_i18n
in repository https://gitbox.apache.org/repos/asf/iotdb-docs.git

commit 700f614162275288a5e148c9bb3266e6e3174dd0
Author: CritasWang <cr...@outlook.com>
AuthorDate: Fri Jan 16 11:46:13 2026 +0800

    Add Kapa AI widget configuration to support multi-language and user consent functionality.
---
 src/.vuepress/config.ts | 85 ++++++++++++++++++++++++++++---------------------
 1 file changed, 48 insertions(+), 37 deletions(-)

diff --git a/src/.vuepress/config.ts b/src/.vuepress/config.ts
index c65c3a8e..a547e93c 100644
--- a/src/.vuepress/config.ts
+++ b/src/.vuepress/config.ts
@@ -23,6 +23,40 @@ import theme from './theme.js';
 
 const dirname = getDirname(import.meta.url);
 
+const kapaConfig = {
+  async: true,
+  src: 'https://widget.kapa.ai/kapa-widget.bundle.js',
+  'data-website-id': '2d37bfdd-8d98-40ba-9223-9d4f81bfb327',
+  // 'data-language': 'zh',
+  'data-project-name': 'Apache IoTDB',
+  'data-project-color': '#FFFFFF',
+  'data-button-z-index': '1999',
+  'data-button-padding': '4px',
+  'data-button-border-radius': '4px',
+  'data-button-image-height': '24px',
+  'data-button-image-width': '20px',
+  'data-button-text-color': '#9E2878',
+  'data-project-logo': 'https://iotdb.apache.org/img/logo.svg',
+  'data-button-position-right': '16px',
+  'data-button-position-bottom': '8px',
+  'data-button-height': '56px',
+  'data-button-width': '48px',
+  'data-button-text': 'Ask',
+  'data-modal-override-open-selector': '#custom-ask-ai-button',
+  'data-modal-image-width': '150px',
+  'data-modal-title': 'AI Docs',
+  'data-modal-title-color': '#9E2878',
+  'data-deep-thinking-button-active-bg-color': '#F6F7F8',
+  'data-deep-thinking-button-active-text-color': '#9E2878',
+  'data-deep-thinking-button-active-hover-text-color': '#9E2878',
+  'data-modal-disclaimer':
+    'This is a custom LLM for Apache IoTDB with access to all [documentation](iotdb.apache.org/docs/), [GitHub Open Issues, PRs and READMEs](github.com/apache/iotdb).&#10;&#10;Companies deploy assistants like this ([built by kapa.ai](https://kapa.ai)) on docs via [website widget](https://docs.kapa.ai/integrations/website-widget) (Docker, Reddit), in [support forms](https://docs.kapa.ai/integrations/support-form-deflector) for ticket deflection (Monday.com, Mapbox), or as [Slack bots](htt [...]
+  'data-user-analytics-fingerprint-enabled': 'true',
+  'data-consent-required': 'true',
+  'data-consent-screen-disclaimer':
+    "By clicking <I agree, let's chat>, 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 reCAPTCHA, which requires your consent to Google's [Privacy Policy](https://policies.google.com/privacy) and [Terms of Service](https://policies.google.com/terms). By proceeding, you explicitly agree to both kapa.ai's and Google's privacy policies.",
+};
+
 export default defineUserConfig({
   base: '/',
 
@@ -31,11 +65,25 @@ export default defineUserConfig({
       lang: 'en-US',
       title: 'IoTDB Website',
       description: 'Apache IoTDB',
+      head: [['script', { ...kapaConfig }]],
     },
     '/zh/': {
       lang: 'zh-CN',
       title: 'IoTDB Website',
       description: 'Apache IoTDB',
+      head: [
+        [
+          'script',
+          {
+            ...kapaConfig,
+            'data-language': 'zh',
+            'data-modal-disclaimer':
+              '这是一个针对 Apache IoTDB 的定制化大型语言模型,能够访问所有[文档](iotdb.apache.org/docs/)、[GitHub 公开问题、PR 和自述文件](github.com/apache/iotdb)。&#10;&#10;许多公司通过 [kapa.ai 构建](https://kapa.ai) 的助手部署在文档上,方式包括通过[网站小部件](https://docs.kapa.ai/integrations/website-widget)(Docker、Reddit)、在[支持表单](https://docs.kapa.ai/integrations/support-form-deflector)中进行工单偏转(Monday.com、Mapbox),或作为具有私有源的[Slack 机器人](https://docs.kapa.ai/integrations/slack-bot)。',
+            'data-consent-screen-disclaimer':
+              "点击<I agree, let's chat>即表示您同意按照 kapa.ai 的[隐私政策](https://www.kapa.ai/content/privacy-policy)使用 AI 助手。本服务使用 reCAPTCHA,您需要同意 Google 的[隐私政策](https://policies.google.com/privacy)和[服务条款](https://policies.google.com/terms)。继续操作即表示您明确同意 kapa.ai 和 Google 的隐私政策。",
+          },
+        ],
+      ],
     },
   },
 
@@ -84,43 +132,6 @@ _paq.push(['enableLinkTracking']);
 })();
 `,
     ],
-    [
-      'script',
-      {
-        async: true,
-        src: 'https://widget.kapa.ai/kapa-widget.bundle.js',
-        'data-website-id': '2d37bfdd-8d98-40ba-9223-9d4f81bfb327',
-        // 'data-language': 'zh',
-        'data-project-name': 'Apache IoTDB',
-        'data-project-color': '#FFFFFF',
-        'data-button-z-index': '1999',
-        'data-button-padding': '4px',
-        'data-button-border-radius': '4px',
-        'data-button-image-height': '24px',
-        'data-button-image-width': '20px',
-        'data-button-text-color': '#9E2878',
-        'data-project-logo': 'https://iotdb.apache.org/img/logo.svg',
-        'data-button-position-right': '16px',
-        'data-button-position-bottom': '8px',
-        'data-button-height': '56px',
-        'data-button-width': '48px',
-        'data-button-text': 'Ask',
-        // 'data-button-hide': 'true',
-        'data-modal-override-open-selector': '#custom-ask-ai-button',
-        'data-modal-image-width': '150px',
-        'data-modal-title': 'AI Docs',
-        'data-modal-title-color': '#9E2878',
-        'data-modal-disclaimer':
-          'This is a custom LLM for Apache IoTDB with access to all [documentation](iotdb.apache.org/docs/), [GitHub Open Issues, PRs and READMEs](github.com/apache/iotdb).&#10;&#10;Companies deploy assistants like this ([built by kapa.ai](https://kapa.ai)) on docs via [website widget](https://docs.kapa.ai/integrations/website-widget) (Docker, Reddit), in [support forms](https://docs.kapa.ai/integrations/support-form-deflector) for ticket deflection (Monday.com, Mapbox), or as [Slack bot [...]
-
-        // 'data-modal-example-questions':
-        //   'How do I get started?,How to add example questions?',
-        'data-user-analytics-fingerprint-enabled': 'true',
-        'data-consent-required': 'true',
-        'data-consent-screen-disclaimer':
-          "By clicking <I agree, let's chat>, 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 reCAPTCHA, which requires your consent to Google's [Privacy Policy](https://policies.google.com/privacy) and [Terms of Service](https://policies.google.com/terms). By proceeding, you explicitly agree to both kapa.ai's and Google's privacy policies.",
-      },
-    ],
   ],
 
   shouldPrefetch: false,