From 1672c01e3a3ef264bb648fa26f9d5c80890680b0 Mon Sep 17 00:00:00 2001 From: Ae0h Date: Thu, 5 Dec 2024 15:10:18 -0800 Subject: [PATCH] feat: Cookbook Onboard integration --- .env.example | 2 - docusaurus.config.js | 3 +- package.json | 4 +- src/theme/Layout/index.js | 3 + src/theme/Navbar/AIButton/index.js | 89 +- src/theme/Navbar/AskCookbook/index.js | 23 + src/theme/Navbar/Content/index.js | 4 +- .../Navbar/MobileSidebar/Search/index.js | 2 - yarn.lock | 2178 ++++++++++++++++- 9 files changed, 2239 insertions(+), 69 deletions(-) delete mode 100644 .env.example create mode 100644 src/theme/Navbar/AskCookbook/index.js diff --git a/.env.example b/.env.example deleted file mode 100644 index ed878c6d..00000000 --- a/.env.example +++ /dev/null @@ -1,2 +0,0 @@ -GTM_CONTAINER_ID=GTM-12345 -MENDABLE_KEY=xxxxx-xxxxx-xxxxx-xxxxx-xxxxx diff --git a/docusaurus.config.js b/docusaurus.config.js index d89f2262..68d52b0f 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -26,7 +26,8 @@ const config = { baseUrl: '/', customFields: { keys : { - mendable : process.env.MENDABLE_KEY + mendable : process.env.MENDABLE_KEY, + cookbook : process.env.COOKBOOK_PUBLIC_API_KEY, }, homePage: { editUrl: 'https://github.com/rsksmart/devportal/tree/main/', diff --git a/package.json b/package.json index 8813dade..a491645a 100644 --- a/package.json +++ b/package.json @@ -17,6 +17,7 @@ "write-heading-ids": "docusaurus write-heading-ids" }, "dependencies": { + "@cookbookdev/docsbot": "^4.24.7", "@docusaurus/core": "^3.4.0", "@docusaurus/plugin-google-tag-manager": "^3.4.0", "@docusaurus/preset-classic": "^3.4.0", @@ -54,5 +55,6 @@ "last 3 firefox version", "last 5 safari version" ] - } + }, + "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e" } diff --git a/src/theme/Layout/index.js b/src/theme/Layout/index.js index 301e9987..b649980a 100644 --- a/src/theme/Layout/index.js +++ b/src/theme/Layout/index.js @@ -15,6 +15,8 @@ import LayoutProvider from '@theme/Layout/Provider'; import ErrorPageContent from '@theme/ErrorPageContent'; import styles from './styles.module.css'; import SVGSprite from "./SVGSprite"; +import AskCookbook from '../Navbar/AskCookbook/index'; + export default function Layout(props) { const { children, @@ -49,6 +51,7 @@ export default function Layout(props) { {!noFooter &&