Skip to content

Commit

Permalink
feat: Cookbook Onboard integration (#486)
Browse files Browse the repository at this point in the history
  • Loading branch information
ClockRide authored Nov 28, 2024
1 parent 8c041c6 commit 1e7a348
Show file tree
Hide file tree
Showing 3 changed files with 1,985 additions and 27 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"preinstall": "npx only-allow yarn"
},
"dependencies": {
"@cookbookdev/docsbot": "^4.21.23",
"@docusaurus/core": "^3.3.2",
"@docusaurus/plugin-client-redirects": "^3.3.2",
"@docusaurus/plugin-google-gtag": "^3.3.2",
Expand Down
15 changes: 15 additions & 0 deletions src/theme/SearchBar/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import React from 'react';
import SearchBar from '@theme-original/SearchBar';
import AskCookbook from '@cookbookdev/docsbot/react'
import BrowserOnly from '@docusaurus/BrowserOnly';

/** It's a public API key, so it's safe to expose it here */
const COOKBOOK_PUBLIC_API_KEY = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiI2NmY0NjNmNmJkODc1Y2E3NmUwMjAzMTciLCJpYXQiOjE3MjcyOTI0MDYsImV4cCI6MjA0Mjg2ODQwNn0.ruDwarOVwJ68IihIdMcqeKM7C0E_JaV-f0JIgqNwsdo";
export default function SearchBarWrapper(props) {
return (
<>
<SearchBar {...props} />
<BrowserOnly>{() => <AskCookbook apiKey={COOKBOOK_PUBLIC_API_KEY} /> }</BrowserOnly>
</>
);
}
Loading

0 comments on commit 1e7a348

Please sign in to comment.