Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
85 changes: 48 additions & 37 deletions src/.vuepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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).

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](https://docs.kapa.ai/integrations/slack-bot) with private sources.',
'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: '/',

Expand All @@ -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 的隐私政策。",
},
],
],
},
},

Expand Down Expand Up @@ -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 bots](https://docs.kapa.ai/integrations/slack-bot) with private sources.',

// '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,
Expand Down