Skip to content

Commit 7d099d4

Browse files
committed
move scripts to the shared config
1 parent e691084 commit 7d099d4

File tree

2 files changed

+29
-24
lines changed

2 files changed

+29
-24
lines changed

apify-docs-theme/src/config.js

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,9 +314,37 @@ const plugins = [
314314
},
315315
];
316316

317+
const scripts = [
318+
{
319+
src: 'https://widget.kapa.ai/kapa-widget.bundle.js',
320+
'data-website-id': 'a9937f98-9c9d-44d9-a433-fec4cb1c114d',
321+
'data-project-name': 'Apify',
322+
'data-modal-title': 'Apify AI Assistant',
323+
'data-project-color': '#666666',
324+
'data-button-hide': 'true',
325+
'data-search-mode-enabled': 'true',
326+
'data-project-logo': 'https://apify.com/img/apify-logo/logomark-32x32.svg',
327+
'data-modal-example-questions': 'How to run an Actor?,Create a version of an Actor?',
328+
'data-modal-override-open-id': 'ask-ai-input',
329+
'data-modal-override-open-class': 'search-input',
330+
'data-font-size-xs': '1.2rem',
331+
'data-font-size-sm': '1.4rem',
332+
'data-font-size-md': '1.6rem',
333+
'data-font-size-lg': '1.8rem',
334+
'data-font-size-xl': '2.0rem',
335+
async: true,
336+
},
337+
{
338+
src: 'https://cdn.jsdelivr.net/npm/@inkeep/[email protected]/dist/embed.js',
339+
type: 'module',
340+
async: true,
341+
},
342+
];
343+
317344
module.exports = {
318345
themeConfig,
319346
plugins,
320347
absoluteUrl,
321348
noIndex,
349+
scripts,
322350
};

docusaurus.config.js

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -19,30 +19,7 @@ module.exports = {
1919
projectName: 'apify-docs',
2020
scripts: [
2121
'/js/custom.js',
22-
{
23-
src: 'https://widget.kapa.ai/kapa-widget.bundle.js',
24-
'data-website-id': 'a9937f98-9c9d-44d9-a433-fec4cb1c114d',
25-
'data-project-name': 'Apify',
26-
'data-modal-title': 'Apify AI Assistant',
27-
'data-project-color': '#666666',
28-
'data-button-hide': 'true',
29-
'data-search-mode-enabled': 'true',
30-
'data-project-logo': 'https://apify.com/img/apify-logo/logomark-32x32.svg',
31-
'data-modal-example-questions': 'How to run an Actor?,Create a version of an Actor?',
32-
'data-modal-override-open-id': 'ask-ai-input',
33-
'data-modal-override-open-class': 'search-input',
34-
'data-font-size-xs': '1.2rem',
35-
'data-font-size-sm': '1.4rem',
36-
'data-font-size-md': '1.6rem',
37-
'data-font-size-lg': '1.8rem',
38-
'data-font-size-xl': '2.0rem',
39-
async: true,
40-
},
41-
{
42-
src: 'https://cdn.jsdelivr.net/npm/@inkeep/[email protected]/dist/embed.js',
43-
type: 'module',
44-
async: true,
45-
},
22+
...config.scripts ?? [],
4623
],
4724
future: {
4825
experimental_faster: {

0 commit comments

Comments
 (0)