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 5, 2024
1 parent d0b6d38 commit e9e41f4
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions docs/_static/custom.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,24 @@ $(document).ready(function () {
$("option[value='" + selected + "']").attr("selected", "selected");
window.location = document.URL.replace(current, selected);
});

// Cookbook Onboard (AI Assistant).
// API key is public so it's fine to just hardcode it here.
var COOKBOOK_PUBLIC_API_KEY = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiI2NmFhY2QzYjZiYmI2MmQwOGY0ZjYzNzgiLCJpYXQiOjE3MjI0Njk2OTEsImV4cCI6MjAzODA0NTY5MX0.Xw4JO3X3T19NOGqPnsz_DYDEBdsxNYM9JkZK4k8ADs8";
var element = document.getElementById("__cookbook");
if (!element) {
element = document.createElement("div");
element.id = "__cookbook";
element.dataset.apiKey = COOKBOOK_PUBLIC_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.defer = true;
document.body.appendChild(script);
}
});

0 comments on commit e9e41f4

Please sign in to comment.