diff --git a/package.json b/package.json index baa25c0eb..8c994bec6 100644 --- a/package.json +++ b/package.json @@ -26,6 +26,7 @@ "@astrojs/partytown": "^2.0.4", "@astrojs/prism": "^3.0.0", "@astrojs/tailwind": "^5.1.0", + "@cookbookdev/docsbot": "^4.21.5", "@nanostores/preact": "^0.3.1", "astro-auto-import": "^0.4.2", "astro-expressive-code": "^0.35.3", diff --git a/src/components/AskCookbook.astro b/src/components/AskCookbook.astro new file mode 100644 index 000000000..627d6e9ae --- /dev/null +++ b/src/components/AskCookbook.astro @@ -0,0 +1,10 @@ +--- +import AskCookbook from "@cookbookdev/docsbot/react" + +// API key is public so it's fine to just hardcode it here. +const COOKBOOK_PUBLIC_API_KEY = + "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiI2NjhkNGNkNDQ5ODQ2YjcxMDdjYjY4MDgiLCJpYXQiOjE3MjA1MzYyNzYsImV4cCI6MjAzNjExMjI3Nn0.ZQ6KvZ4lRGTQUyleQFS0okdNOhZI_wsv2v9YFn2t6Pw" +--- + + + diff --git a/src/layouts/HomeLayout.astro b/src/layouts/HomeLayout.astro index e05988ffa..d8b1d529a 100644 --- a/src/layouts/HomeLayout.astro +++ b/src/layouts/HomeLayout.astro @@ -5,6 +5,7 @@ import Header from "../components/Header/Header.astro" import * as CONFIG from "../config" import Footer from "~/components/Footer/Footer.astro" import LeftSidebar from "../components/LeftSidebar/LeftSidebar.astro" +import AskCookbook from "~/components/AskCookbook.astro" const { content = {} } = Astro.props const currentPage = new URL(Astro.request.url).pathname @@ -87,5 +88,6 @@ const canonicalURL = new URL(Astro.url.pathname, Astro.site)