Skip to content

Commit

Permalink
feat: Cookbook Onboard integration
Browse files Browse the repository at this point in the history
  • Loading branch information
ClockRide committed Sep 17, 2024
1 parent 502bde7 commit dcd0c15
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions main/.vitepress/config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,34 @@ export default defineConfig({
}, 500);
`,
],
/* --- Cookbook Onboard integration --- */
[
'script',
{},
`
document.addEventListener('DOMContentLoaded', function() {
// Cookbook Onboard (AI Assistant). API key is public so it's fine to just hardcode it here.
var COOKBOOK_API_KEY = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiI2NmExOTE1ZjY4ZWI5Y2IyMDQzY2E5MGMiLCJpYXQiOjE3MjE4NjQ1NDMsImV4cCI6MjAzNzQ0MDU0M30.zPYzKohNZXSvgGeTjeZc8NmE13lwaj5A-cq1p0MMC5E";
var element = document.getElementById('__cookbook');
if (!element) {
element = document.createElement('div');
element.id = '__cookbook';
element.dataset.apiKey = COOKBOOK_API_KEY;
document.body.appendChild(element);
}
var script = document.getElementById('__cookbook-script');
if (!script) {
script = document.createElement('script');
script.src = 'https://cdn.jsdelivr.net/npm/@cookbookdev/docsbot/dist/standalone/index.cjs.js';
script.id = '__cookbook-script';
script.async = true;
document.body.appendChild(script);
}
});
`,
],
],
ignoreDeadLinks: [
// ignore all localhost links
Expand Down

0 comments on commit dcd0c15

Please sign in to comment.