Skip to content

Commit 8cfa937

Browse files
authored
Feat kapa (#956)
* add ask ai by kapa * Ensure accessibility
1 parent 6e0b76e commit 8cfa937

File tree

4 files changed

+39
-2
lines changed

4 files changed

+39
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,5 +48,5 @@
4848
"singleQuote": true,
4949
"trailingComma": "all"
5050
},
51-
"packageManager": "pnpm@10.25.0"
51+
"packageManager": "pnpm@10.27.0"
5252
}

src/.vuepress/config.ts

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,43 @@ _paq.push(['enableLinkTracking']);
8484
})();
8585
`,
8686
],
87+
[
88+
'script',
89+
{
90+
async: true,
91+
src: 'https://widget.kapa.ai/kapa-widget.bundle.js',
92+
'data-website-id': '2d37bfdd-8d98-40ba-9223-9d4f81bfb327',
93+
// 'data-language': 'zh',
94+
'data-project-name': 'Apache IoTDB',
95+
'data-project-color': '#9E2878',
96+
'data-project-logo': 'https://iotdb.apache.org/slogo.png',
97+
'data-button-position-right': '16px',
98+
'data-button-position-bottom': '120px',
99+
'data-button-height': '50px',
100+
'data-button-width': '50px',
101+
'data-button-text': 'Ask',
102+
'data-modal-image-width': '150px',
103+
'data-modal-title': 'AI Docs',
104+
// 'data-modal-disclaimer':
105+
// 'This is a custom LLM with access to all [Kapa documentation](https://docs.kapa.ai).',
106+
// 'data-modal-example-questions':
107+
// 'How do I get started?,How to add example questions?',
108+
'data-user-analytics-fingerprint-enabled': 'true',
109+
// 'data-modal-x-offset': '0',
110+
// 'data-modal-y-offset': '0',
111+
// 'data-modal-with-overlay': 'false',
112+
// 'data-modal-inner-flex-direction': 'column',
113+
// 'data-modal-inner-justify-content': 'end',
114+
// 'data-modal-inner-max-width': '500px',
115+
// 'data-modal-inner-position-left': 'auto',
116+
// 'data-modal-inner-position-right': '0',
117+
// 'data-modal-inner-position-bottom': '0',
118+
// 'data-modal-inner-position-top': '0',
119+
// 'data-modal-size': '100vh',
120+
// 'data-modal-lock-scroll': 'false',
121+
// 'data-modal-header-bg-color': '#fff',
122+
},
123+
],
87124
],
88125

89126
shouldPrefetch: false,

src/.vuepress/public/.htaccess

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ RewriteRule . /404.html [L]
66

77
ErrorDocument 404 /404.html
88

9-
Header set Content-Security-Policy "default-src data: blob: 'self' *.apache.org *.githubusercontent.com *.github.com *.algolia.net *.algolianet.com *.apachecon.com *.communityovercode.org 'unsafe-inline' 'unsafe-eval'; frame-src 'self' data: blob:; frame-ancestors 'self'; worker-src 'self' data: blob:; img-src 'self' blob: data: https: *.apache.org www.apachecon.com; style-src 'self' 'unsafe-inline' data:;"
9+
Header set Content-Security-Policy "default-src data: blob: 'self' *.apache.org *.githubusercontent.com *.github.com *.algolia.net *.algolianet.com *.kapa.ai *.apachecon.com *.communityovercode.org 'unsafe-inline' 'unsafe-eval'; frame-src 'self' data: blob:; frame-ancestors 'self'; worker-src 'self' data: blob:; img-src 'self' blob: data: https: *.apache.org www.apachecon.com; style-src 'self' 'unsafe-inline' data:;"

src/.vuepress/public/slogo.png

7.68 KB
Loading

0 commit comments

Comments
 (0)