Skip to content

Commit 51e5394

Browse files
committed
feat: Cookbook Onboard integration
1 parent 6ef2085 commit 51e5394

File tree

1 file changed

+29
-1
lines changed

1 file changed

+29
-1
lines changed

main/.vitepress/config.mjs

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,34 @@ export default defineConfig({
7979
}, 500);
8080
`,
8181
],
82+
/* --- Cookbook Onboard integration --- */
83+
[
84+
'script',
85+
{},
86+
`
87+
document.addEventListener('DOMContentLoaded', function() {
88+
// Cookbook Onboard (AI Assistant). API key is public so it's fine to just hardcode it here.
89+
var COOKBOOK_API_KEY = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiI2NmExOTE1ZjY4ZWI5Y2IyMDQzY2E5MGMiLCJpYXQiOjE3MjE4NjQ1NDMsImV4cCI6MjAzNzQ0MDU0M30.zPYzKohNZXSvgGeTjeZc8NmE13lwaj5A-cq1p0MMC5E";
90+
91+
var element = document.getElementById('__cookbook');
92+
if (!element) {
93+
element = document.createElement('div');
94+
element.id = '__cookbook';
95+
element.dataset.apiKey = COOKBOOK_API_KEY;
96+
document.body.appendChild(element);
97+
}
98+
99+
var script = document.getElementById('__cookbook-script');
100+
if (!script) {
101+
script = document.createElement('script');
102+
script.src = 'https://cdn.jsdelivr.net/npm/@cookbookdev/docsbot/dist/standalone/index.cjs.js';
103+
script.id = '__cookbook-script';
104+
script.async = true;
105+
document.body.appendChild(script);
106+
}
107+
});
108+
`,
109+
],
82110
],
83111
ignoreDeadLinks: [
84112
// ignore all localhost links
@@ -651,4 +679,4 @@ export default defineConfig({
651679
},
652680
],
653681
},
654-
});
682+
});

0 commit comments

Comments
 (0)