Skip to content

Commit

Permalink
chore: Cookbook Onboard integration (#7044)
Browse files Browse the repository at this point in the history
  • Loading branch information
AE-0h authored Jan 17, 2025
1 parent a311791 commit a6685be
Show file tree
Hide file tree
Showing 3 changed files with 3,098 additions and 79 deletions.
1 change: 1 addition & 0 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"version": "yarn version::stables && ./scripts/cut_version.sh"
},
"dependencies": {
"@cookbookdev/docsbot": "^4.24.9",
"@docusaurus/core": "^3.5.2",
"@docusaurus/preset-classic": "^3.5.2",
"@easyops-cn/docusaurus-search-local": "^0.35.0",
Expand Down
14 changes: 14 additions & 0 deletions docs/src/theme/SearchBar/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
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.eyJzdWIiOiI2NzVhMGVkODQ4MGI5OThmNzlhNjNhOTciLCJpYXQiOjE3MzM5NTUyODgsImV4cCI6MjA0OTUzMTI4OH0.NzQlH2sfhJkjvnYxoaRgSY6nRyNClxHg57n3-JueN9Q";
export default function SearchBarWrapper(props) {
return (
<>
<SearchBar {...props} />
<BrowserOnly>{() => <AskCookbook apiKey={COOKBOOK_PUBLIC_API_KEY} /> }</BrowserOnly>
</>
);
}
Loading

0 comments on commit a6685be

Please sign in to comment.