diff --git a/package.json b/package.json index 4bc2bc7f2..155f23b90 100644 --- a/package.json +++ b/package.json @@ -23,6 +23,7 @@ "@eth-optimism/tokenlist": "^9.0.9", "@feelback/react": "^0.3.4", "@headlessui/react": "^2.1.8", + "@remixicon/react": "^4.6.0", "algoliasearch": "^4.23.3", "clsx": "^2.1.1", "dotenv": "^16.4.7", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 656eabb3d..d89a9de2d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -31,6 +31,9 @@ importers: '@headlessui/react': specifier: ^2.1.8 version: 2.1.8(react-dom@18.2.0(react@18.2.0))(react@18.2.0) + '@remixicon/react': + specifier: ^4.6.0 + version: 4.6.0(react@18.2.0) algoliasearch: specifier: ^4.23.3 version: 4.23.3 @@ -861,6 +864,11 @@ packages: peerDependencies: react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0 + '@remixicon/react@4.6.0': + resolution: {integrity: sha512-bY56maEgT5IYUSRotqy9h03IAKJC85vlKtWFg2FKzfs8JPrkdBAYSa9dxoUSKFwGzup8Ux6vjShs9Aec3jvr2w==} + peerDependencies: + react: '>=18.2.0' + '@scure/base@1.1.3': resolution: {integrity: sha512-/+SgoRjLq7Xlf0CWuLHq2LUZeL/w65kfzAPG5NH9pcmBhs+nunQTn4gvdwgMTIXnt9b2C/1SeL2XiysZEyIC9Q==} @@ -4785,6 +4793,10 @@ snapshots: dependencies: react: 18.2.0 + '@remixicon/react@4.6.0(react@18.2.0)': + dependencies: + react: 18.2.0 + '@scure/base@1.1.3': {} '@scure/base@1.1.9': {} diff --git a/theme.config.tsx b/theme.config.tsx index 9aa67b05b..59112e275 100644 --- a/theme.config.tsx +++ b/theme.config.tsx @@ -1,28 +1,23 @@ -import React from "react"; -import { DocsThemeConfig } from "nextra-theme-docs"; -import { useRouter } from "next/router"; -import { useConfig } from "nextra-theme-docs"; -import { FeelbackYesNo, PRESET_LIKE_DISLIKE } from "@feelback/react"; -import "@feelback/react/styles/feelback.css"; -import { Search } from "./components/Search"; +import React from 'react'; +import { DocsThemeConfig } from 'nextra-theme-docs'; +import { useRouter } from 'next/router'; +import { useConfig } from 'nextra-theme-docs'; +import { FeelbackYesNo, PRESET_LIKE_DISLIKE } from '@feelback/react'; +import '@feelback/react/styles/feelback.css'; +import { Search } from './components/Search'; +import { RiSparkling2Fill } from '@remixicon/react'; const config: DocsThemeConfig = { logo: ( <> - + @@ -30,150 +25,131 @@ const config: DocsThemeConfig = { darkMode: true, banner: { key: 'viem/op-stack', - text: ( - - 🎉 We are deprecating the Optimism SDK and migrating all tutorials to use viem/op-stack. Read more → - - ) + text: 🎉 We are deprecating the Optimism SDK and migrating all tutorials to use viem/op-stack. Read more → }, - search: { - component: Search, - }, - project: { - link: "https://github.com/ethereum-optimism/docs", + search: { + component: Search + }, + navbar: { + extraContent: ( + Ask AI + + + ) }, - docsRepositoryBase: "https://github.com/ethereum-optimism/docs/blob/main/", + docsRepositoryBase: 'https://github.com/ethereum-optimism/docs/blob/main/', footer: { text: ( -
+
© 2025 Optimism Foundation. All rights reserved.
- -
- + +
+ Optimism Community Agreement - - Terms of Service + + Terms of Service - + Privacy Policy
- -
- - - + +
) - }, - - - - + }, sidebar: { defaultMenuCollapseLevel: 1, - autoCollapse: true, + autoCollapse: true }, toc: { backToTop: true, extraContent: () => ( <> -
- -
+
+ +
- ), + ) }, navigation: false, feedback: { - content: "❤️ Share general feedback", - labels: "user-feedback", + content: '❤️ Share general feedback', + labels: 'user-feedback' }, editLink: { - text: "✏️ Edit this page on GitHub", + text: '✏️ Edit this page on GitHub' }, useNextSeoProps() { const { asPath } = useRouter(); - if (asPath !== "/") { + if (asPath !== '/') { return { - titleTemplate: "%s | Optimism Docs", + titleTemplate: '%s | Optimism Docs' }; } }, head: () => { const { asPath, defaultLocale, locale } = useRouter(); const { frontMatter } = useConfig(); - const url = - "https://docs.optimism.io" + - (defaultLocale === locale ? asPath : `/${locale}${asPath}`); + const url = 'https://docs.optimism.io' + (defaultLocale === locale ? asPath : `/${locale}${asPath}`); return ( <> - - - - - - - - - + + + + + + + + + + ); - }, + } // https://nextra.site/docs/docs-theme/theme-configuration // primaryHue: { // dark: