diff --git a/.changeset/new-dragons-search.md b/.changeset/new-dragons-search.md new file mode 100644 index 0000000000..7ba809df1e --- /dev/null +++ b/.changeset/new-dragons-search.md @@ -0,0 +1,7 @@ +--- +'nextra': patch +'nextra-theme-blog': patch +'nextra-theme-docs': patch +--- + +update docs for 2.0 diff --git a/docs/components/card/index.tsx b/docs/components/card/index.tsx index 31d068817d..41d2a992d5 100644 --- a/docs/components/card/index.tsx +++ b/docs/components/card/index.tsx @@ -58,16 +58,16 @@ export function Card({ href={href} className={cn( styles.card, - 'group flex flex-col justify-start overflow-hidden rounded-lg border border-gray-200 text-current no-underline shadow-sm shadow-gray-100 transition-all duration-200', - 'hover:border-gray-300 hover:bg-slate-50 hover:shadow-md hover:shadow-gray-100' + 'group flex flex-col justify-start overflow-hidden rounded-lg border border-gray-200 bg-transparent text-current no-underline shadow-sm shadow-gray-100 transition-all duration-200 dark:border-neutral-800 dark:shadow-none', + 'hover:border-gray-300 hover:bg-slate-50 hover:shadow-md hover:shadow-gray-100 dark:hover:border-neutral-700 dark:hover:bg-neutral-900 dark:hover:shadow-none' )} {...props} > {icon} diff --git a/docs/components/card/style.module.css b/docs/components/card/style.module.css index 10eca5719e..9e21b1f431 100644 --- a/docs/components/card/style.module.css +++ b/docs/components/card/style.module.css @@ -27,12 +27,6 @@ align-items: flex-start; } -:global(.dark) .card { - background-color: hsl(var(--nextra-primary-hue) 10% 12%/0.9); -} -:global(.dark) .card:hover { - box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1); -} :global(.dark) .card svg { color: #ffffff66; } diff --git a/docs/components/table/index.tsx b/docs/components/table/index.tsx index 774f6669f3..84f4178435 100644 --- a/docs/components/table/index.tsx +++ b/docs/components/table/index.tsx @@ -3,19 +3,17 @@ export function OptionTable({ options }: { options: [string, string, any] }) {
- + - + {options.map(([option, type, description]) => (
Option Type - Description - Description
{option} diff --git a/docs/pages/docs/docs-theme.mdx b/docs/pages/docs/docs-theme.mdx index d6e41ec4d4..a031c2c82f 100644 --- a/docs/pages/docs/docs-theme.mdx +++ b/docs/pages/docs/docs-theme.mdx @@ -3,28 +3,22 @@ import { Card, Cards } from '@components/card' - - - - } title="Get Started" href="/docs/docs-theme/start"> + + +} title="Get Started" href="/docs/docs-theme/start"> - - - - } title="Page Configuration" href="/docs/docs-theme/page-configuration"> + + + } title="Page Configuration" href="/docs/docs-theme/page-configuration"> - - + + - } title="Theme Configuration" href="/docs/docs-theme/theme-configuration"> +} title="Theme Configuration" href="/docs/docs-theme/theme-configuration"> - - + + - } title="Components" href="/docs/docs-theme/components"> + } title="Built-in Components" href="/docs/docs-theme/components"> diff --git a/docs/pages/docs/docs-theme/_meta.json b/docs/pages/docs/docs-theme/_meta.json index 2cf2b8286a..6054d77bea 100644 --- a/docs/pages/docs/docs-theme/_meta.json +++ b/docs/pages/docs/docs-theme/_meta.json @@ -4,5 +4,5 @@ "title": "Page Configuration" }, "theme-configuration": "Theme Configuration", - "api": "API" + "built-ins": "Built-ins" } diff --git a/docs/pages/docs/docs-theme/api.mdx b/docs/pages/docs/docs-theme/api.mdx deleted file mode 100644 index 66439c58c6..0000000000 --- a/docs/pages/docs/docs-theme/api.mdx +++ /dev/null @@ -1,20 +0,0 @@ -# API - -import { Card, Cards } from '@components/card' - -The Docs Theme includes a couple of built-in components that you can use to better style your documentation: - - - - } title="Callout" href="/docs/docs-theme/components/callout"> - - - } title="Tabs" href="/docs/docs-theme/components/tabs"> - - - } title="Bleed" href="/docs/docs-theme/components/bleed"> - - diff --git a/docs/pages/docs/docs-theme/api/tabs.mdx b/docs/pages/docs/docs-theme/api/tabs.mdx deleted file mode 100644 index 604e1471bd..0000000000 --- a/docs/pages/docs/docs-theme/api/tabs.mdx +++ /dev/null @@ -1 +0,0 @@ -(todo) \ No newline at end of file diff --git a/docs/pages/docs/docs-theme/built-ins.mdx b/docs/pages/docs/docs-theme/built-ins.mdx new file mode 100644 index 0000000000..0fc69e39fe --- /dev/null +++ b/docs/pages/docs/docs-theme/built-ins.mdx @@ -0,0 +1,18 @@ +# Built-ins + +import { Card, Cards } from '@components/card' + +The Docs Theme includes a couple of built-in components that you can use to better style your documentation: + + + + + + } title="Callout" href="/docs/docs-theme/built-ins/callout"> + + + +} title="Tabs" href="/docs/docs-theme/built-ins/tabs"> + + diff --git a/docs/pages/docs/docs-theme/api/bleed.mdx b/docs/pages/docs/docs-theme/built-ins/bleed.mdx.temp similarity index 100% rename from docs/pages/docs/docs-theme/api/bleed.mdx rename to docs/pages/docs/docs-theme/built-ins/bleed.mdx.temp diff --git a/docs/pages/docs/docs-theme/api/callout.mdx b/docs/pages/docs/docs-theme/built-ins/callout.mdx similarity index 100% rename from docs/pages/docs/docs-theme/api/callout.mdx rename to docs/pages/docs/docs-theme/built-ins/callout.mdx diff --git a/docs/pages/docs/docs-theme/built-ins/tabs.mdx b/docs/pages/docs/docs-theme/built-ins/tabs.mdx new file mode 100644 index 0000000000..74ea6631ae --- /dev/null +++ b/docs/pages/docs/docs-theme/built-ins/tabs.mdx @@ -0,0 +1,65 @@ +# Tab Component + +A built-in tab component of the Docs Theme. + +## Example + +import { Tab, Tabs } from 'nextra-theme-docs' + + + + **pNPM**: Fast, disk space efficient package manager. + + + **npm** is a package manager for the JavaScript programming language. + + + **Yarn** is a software packaging system. + + + +## Usage + +### Default + +```mdx +import { Tab, Tabs } from 'nextra-theme-docs' + + + + **pNPM**: Fast, disk space efficient package manager. + + + **npm** is a package manager for the JavaScript programming language. + + + **Yarn** is a software packaging system. + + +``` + +### Default Selected Index + +You can use the `defaultIndex` prop to set the default tab index: + +```mdx /defaultIndex="1"/ +import { Tab, Tabs } from 'nextra-theme-docs' + + + ... + +``` + +And you will have `npm` as the default tab: + + + + **pNPM**: Fast, disk space efficient package manager. + + + **npm** is a package manager for the JavaScript programming language. + + + **Yarn** is a software packaging system. + + diff --git a/docs/pages/docs/docs-theme/start.mdx b/docs/pages/docs/docs-theme/start.mdx index 77af280c2e..05898de9b8 100644 --- a/docs/pages/docs/docs-theme/start.mdx +++ b/docs/pages/docs/docs-theme/start.mdx @@ -4,6 +4,8 @@ import { Callout, Tab, Tabs } from 'nextra-theme-docs' Nextra Docs Theme is a theme that includes almost everything you need to build a modern documentation website. It includes a top navigation bar, a search bar, a pages sidebar, a TOC sidebar, and other built-in components. +This website itself is built with the Nextra Docs Theme. + ## Quick Start from Template {/* You can start by creating your own Nextra site and deploying to Vercel by clicking the link: */} @@ -44,18 +46,6 @@ To create a Nextra Docs site manually, you have to install **Next.js**, **React* -Like any Next.js projects, you need to also add the following scripts to your `package.json` file: - -```json filename="package.json" -{ - "scripts": { - "dev": "next", - "build": "next build", - "start": "next start" - } -} -``` - If you already have Next.js installed in your project, you only need to install `nextra` and `nextra-theme-docs` as the add-ons. @@ -76,15 +66,7 @@ module.exports = withNextra() // module.exports = withNextra({ /* other next.js config */ }) ``` -With the above configuration, Nextra can handle Markdown files in your Next.js project, with the specified theme. Full Nextra configurations can be found here: - -import { Card, Cards } from '@components/card' - -import switchIcon from '@components/icons/switch' - - - - +With the above configuration, Nextra can handle Markdown files in your Next.js project, with the specified theme. Full Nextra configurations can be found [here](/docs/docs-theme/theme-configuration). ### Create Docs Theme Config @@ -93,19 +75,19 @@ Lastly, create the corresponding `theme.config.jsx` file in your project’s roo ```jsx filename="theme.config.jsx" export default { logo: My Nextra Documentation, + project: { + link: 'https://github.com/shuding/nextra', + }, + titleSuffix: ' – Nextra', // ... } ``` -More options for this theme can be found here: - - - - +Full theme configurations can be found [here](/docs/docs-theme/theme-configuration). ### Ready to Go! -Now, you can create your first MDX page in `pages/index.mdx`: +Now, you can create your first MDX page as `pages/index.mdx`: ```mdx filename="pages/index.mdx" # Welcome to Nextra @@ -113,12 +95,25 @@ Now, you can create your first MDX page in `pages/index.mdx`: Hello, world! ``` -And run the `dev` command to start developing the project: +And run the `pnpm next` command to start developing the project! 🎉 + -```bash -pnpm dev -``` +Next, check out the next section to learn about organizing the documentation structure and configuring the website theme: - +import { Card, Cards } from '@components/card' + + + + + +} title="Page Structure" href="/docs/docs-theme/page-configuration"/> + + + +} title="Theme Configuration" href="/docs/docs-theme/theme-configuration"/> + + + +} title="Built-in Components" href="/docs/docs-theme/built-ins"/> + -Next step, check out the next section to learn about organizing your documentation pages. diff --git a/docs/pages/docs/docs-theme/theme-configuration.mdx b/docs/pages/docs/docs-theme/theme-configuration.mdx index dd88a2e7b6..6d6f2824e1 100644 --- a/docs/pages/docs/docs-theme/theme-configuration.mdx +++ b/docs/pages/docs/docs-theme/theme-configuration.mdx @@ -18,7 +18,151 @@ Detailed information for each option is listed below. import { OptionTable } from 'components/table' -## Project Link +## Global + +### Docs Repository + +Set the repository URL of the documentation. It’s used to generate the “[Edit this page](#edit-link)” link and the “[Feedback](#feedback-link)” link. + + + +#### Specify a Path + +If the documentation is inside a monorepo, a subfolder, or a different branch of the repository, you can simply set the `docsRepositoryBase` to the root path of the `pages/` folder of your docs. For example: + +```jsx +export default { + docsRepositoryBase: 'https://github.com/shuding/nextra/blob/core/docs/pages', +} +``` + +Then Nextra will automatically generate the correct file path for all pages. + +### Title Suffix + +In Nextra, the website title will be the content of `

` of each page. If `

` is missing, it will use the page title specified in the [page configuration](/docs/docs-theme/page-configuration). You can also provide a global suffix via the `titleSuffix` option. + + string)', 'The title suffix.'], +]}/> + +import titleSuffixImage from '../../../public/assets/docs/title-suffix.png' + + + +```jsx +export default { + titleSuffix: ' – SWR', +} +``` + +### Head Tags + +Configure the `` tags of the website. You can add meta tags, title, favicon, etc. + +Component that renders the {''} content.], +]}/> + +#### Static head tags + +If you have only static head tags, it’s easy to directly put them in `head`. For example: + +```jsx +export default { + head: ( + <> + + + + + ), +} +``` + +#### Dynamic tags based on page + +You can also use a _function component_ as `head` to dynamically generate the head tags based on the current page’s front matter. For example: + +```jsx +import { useRouter } from 'next/router' +import { useConfig } from 'nextra-theme-docs' + +export default { + head: () => { + const { asPath } = useRouter() + const { frontMatter } = useConfig() + return <> + + + + + }, +} +``` + +You can refer to the [`useConfig`](/docs/docs-theme/api/use-config) API section for more information about the `useConfig` hook and the `frontMatter` object. + +### Dark Mode and Themes + +Customize the theme behavior of the website. + +Configuration for the next-themes package.], +]}/> + +### Theme Color + +You can adjust the theme color of the website by setting a primary hue value to dark or light themes. + + + +
Try it out for this website: { + const hue = e.target.value + 'deg' + document.documentElement.style.setProperty('--nextra-primary-hue', hue) + document.getElementById('test-theme-hue').innerText = hue +}} />
+ +## Navbar + +### Logo + +The logo of the website rendered on the navbar. It can be a React node or a function component. + + + +import logoImage from '../../../public/assets/docs/logo.png' + + + +
[Live example on StackBlitz ↗](https://stackblitz.com/edit/nextra-2-docs-yrlccm?file=theme.config.jsx)
+ +```jsx +export default { + logo: ( + <> + + + + + My Cool Project + + + ), +} +``` + +### Project Link Show a button that links to your project’s homepage on the navbar. By default, it links to Nextra’s GitHub repository. @@ -27,8 +171,6 @@ Show a button that links to your project’s homepage on the navbar. By default, ['project.icon', 'React.ReactNode | React.FC', 'Icon or element of the project link.'], ]}/> -### Use a custom icon - You can configure `project.link` and `project.icon` to customize the project link, for example make it link to your GitLab repository: import projectLinkImage from '../../../public/assets/docs/project-link.png' @@ -46,7 +188,7 @@ export default { If `icon` is missing, it will be a [GitHub icon](https://primer.style/octicons/mark-github-16) by default. -## Chat Link +### Chat Link Show a button that links to your project’s forum or other social media on the navbar. @@ -55,8 +197,6 @@ Show a button that links to your project’s forum or other social media on the ['chat.icon', 'React.ReactNode | React.FC', 'Icon or element of the chat link.'], ]}/> -### Customize chat link - You can configure `chat.link` and `chat.icon` to customize the chat link, for example make it link to your Twitter account: ```jsx @@ -70,7 +210,22 @@ export default { If `icon` is missing, it will be a Discord icon by default. -## Banner +### Menu and Custom Links + +Check out [Page Configuration](/docs/docs-theme/page-configuration#navbar-items) to learn how to add custom menus or links to the navbar. + +### Search + +`, ''], + ['search.emptyResult', 'React.ReactNode | React.FC', ''], + ['search.placeholder', 'string | (() => string)', ''], +]}/> + +### Banner Show a dismissable banner on the top of the website. It can be used to show a warning or a notice. @@ -79,7 +234,7 @@ Show a dismissable banner on the top of the website. It can be used to show a wa ['banner.content', 'React.ReactNode | React.FC', 'Content of the banner.'], ]}/> -### Banner key +#### Banner key A banner can be dismissed. By default `banner.key` will be `"nextra-banner"` and it’s used by [localStorage](https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage) to keep the banner state (dismissed or not) on the client. @@ -100,88 +255,28 @@ export default { } ``` -## Navigation +### Customize the Navbar -Show previous and next page links on the bottom of the content. It’s useful for navigating between pages. +Customize the entire navbar component. - -import navigationImage from '../../../public/assets/docs/navigation.png' - - - -```jsx -export default { - navigation: { - prev: true, - next: true, - }, -} -``` - -The above is also equivalent to `navigation: true`. - -## Head Tags - -Configure the `` tags of the website. You can add meta tags, title, favicon, etc. - -Component that renders the {''} content.], + ['navbar', 'React.ReactNode | React.FC', 'Navbar component.'], ]}/> -### Static head tags - -If you have only static head tags, it’s easy to directly put them in `head`. For example: - -```jsx -export default { - head: ( - <> - - - - - ), -} -``` - -### Dynamic tags based on page - -You can also use a _function component_ as `head` to dynamically generate the head tags based on the current page’s front matter. For example: - -```jsx -import { useRouter } from 'next/router' -import { useConfig } from 'nextra-theme-docs' - -export default { - head: () => { - const { asPath } = useRouter() - const { frontMatter } = useConfig() - return <> - - - - - }, -} -``` - -You can refer to the [`useConfig`](/docs/docs-theme/api/use-config) API section for more information about the `useConfig` hook and the `frontMatter` object. - ## Sidebar `, 'Custom renderer for sidebar titles.'], ]}/> +### Menu Collapse Level + +By default, the sidebar menu is collapsed at level `2`. You can change it by setting `sidebar.defaultMenuCollapseLevel` to a different number. For example, when set to `0`, every folder will be collapsed by default and when set to `Infinity`, all nested folders will be expanded by default. + ### Customize sidebar content Together with the [Separators](/docs/docs-theme/page-configuration#separators) item, you can customize how the sidebar content is rendered by using the `sidebar.titleComponent` option: @@ -229,102 +324,35 @@ import sidebarTitleComponentImage from '../../../public/assets/docs/sidebar-cust -## Title - -In Nextra, the website title will be the content of `

` of each page. If `

` is missing, it will use the page title specified in the [page configuration](/docs/docs-theme/page-configuration). You can also provide a global suffix via the `titleSuffix` option. - - string)', 'The title suffix.'], -]}/> - -import titleSuffixImage from '../../../public/assets/docs/title-suffix.png' - - - -```jsx -export default { - titleSuffix: ' – SWR', -} -``` - -## Footer - -The footer area of the website. You can either specify some content for the default footer, or fully customize it with a custom component. - -', 'Customized footer component.'], -]}/> +## Content -### Copyright information - -You can add some simple content, such as copyright information to the default footer: +### MDX Components -```jsx -export default { - footer: { - content: - MIT ${new Date().getFullYear()} © Nextra. - , - } -} -``` - -## Edit Link - -Show an “Edit this page” link on the page that points to the file URL on GitHub (or other places). +Provide custom [MDX components](https://mdxjs.com/table-of-components/) to render the content. For example, you can use a custom `pre` component to render code blocks. `, 'Customized edit link component.'], + ['components', 'Record', 'Custom MDX components.'], ]}/> -## Feedback Link +### Writing Direction -The built-in feedback link provides a way for users to submit feedback about the documentation. By default, it’s a link that points to the issue creation form of the docs repository, with the current website title prefilled. +The default writing direction of the website. -## Logo +### Extra Content -The logo of the website rendered on the navbar. It can be any React node. +Render extra content at the end of the main area of the page. It can be used to render a comment section, a newsletter form, or any other type of content. -import logoImage from '../../../public/assets/docs/logo.png' +## TOC Sidebar - - -
[Live example on StackBlitz ↗](https://stackblitz.com/edit/nextra-2-docs-yrlccm?file=theme.config.jsx)
- -```jsx -export default { - logo: ( - <> - - - - - My Cool Project - - - ), -} -``` - -## Table of Contents +### Table of Contents Show a table of contents on the right side of the page. It’s useful for navigating between headings. @@ -335,53 +363,58 @@ Show a table of contents on the right side of the page. It’s useful for naviga ['toc.title', 'React.ReactNode | React.FC', 'Float the TOC next to the content.'], ]}/> -### Floating TOC +#### Floating TOC -## Extra Content +### Edit Link -Render extra content at the end of the main area of the page. It can be used to render a comment section, a newsletter form, or any other type of content. +Show an “Edit this page” link on the page that points to the file URL on GitHub (or other places). `, 'Customized edit link component.'], ]}/> -## MDX Components +### Feedback Link -Provide custom [MDX components](https://mdxjs.com/table-of-components/) to render the content. For example, you can use a custom `pre` component to render code blocks. +The built-in feedback link provides a way for users to submit feedback about the documentation. By default, it’s a link that points to the issue creation form of the docs repository, with the current website title prefilled. ', 'Custom MDX components.'], + ['feedback.content', 'React.ReactNode | React.FC', 'Content of the feedback link.'], + ['feedback.labels', 'string', 'Labels that can be added to the new created GitHub issue.'], ]}/> -## Writing Direction - -The default writing direction of the website. - - +## End of Page -## Docs Repository +### Navigation -Set the repository URL of the documentation. It’s used to generate the “[Edit this page](#edit-link)” link and the “[Feedback](#feedback-link)” link. +Show previous and next page links on the bottom of the content. It’s useful for navigating between pages. -### Specify path +import navigationImage from '../../../public/assets/docs/navigation.png' -If the documentation is inside a monorepo, a subfolder, or a different branch of the repository, you can simply set the `docsRepositoryBase` to the root path of the `pages/` folder of your docs. For example: + ```jsx export default { - docsRepositoryBase: 'https://github.com/shuding/nextra/blob/core/docs/pages', + navigation: { + prev: true, + next: true, + }, } ``` -Then Nextra will automatically generate the correct file path for all pages. +The above is also equivalent to `navigation: true`. -## Last Updated Date +### Last Updated Date Show the last updated date of each page. It’s useful for showing the freshness of the content. @@ -389,32 +422,28 @@ Show the last updated date of each page. It’s useful for showing the freshness ['gitTimestamp', 'React.ReactNode | React.FC<{ timestamp: Date }>', 'Component to render the last updated info.'], ]}/> -## I18n - -## Navbar - -Customize the navbar of the website. - -', 'Navbar component.'], -]}/> - -## Dark Mode and Themes +## Footer -Customize the theme behavior of the website. +The footer area of the website. You can either specify some content for the default footer, or fully customize it with a custom component. ', 'Customized footer component.'], ]}/> -## Theme Color +### Copyright information -You can adjust the theme color of the website. +You can add some simple content, such as copyright information to the default footer: - +```jsx +export default { + footer: { + content: + MIT ${new Date().getFullYear()} © Nextra. + , + } +} +``` ## Error Pages @@ -422,17 +451,6 @@ You can adjust the theme color of the website. ### 500 - Internal Server Error -## Search - -`, ''], - ['search.emptyResult', 'React.ReactNode | React.FC', ''], - ['search.placeholder', 'string | (() => string)', ''], -]}/> - ## Favicon Glyph (Experimental) This isn’t supported by all browsers, but it’s a nice way to customize the favicon of the website simply by using an emoji or character. diff --git a/docs/pages/docs/guide.mdx b/docs/pages/docs/guide.mdx index eba49b480b..79a222ca3b 100644 --- a/docs/pages/docs/guide.mdx +++ b/docs/pages/docs/guide.mdx @@ -5,8 +5,8 @@ import { Card, Cards } from '@components/card' import markdownIcon from '@components/icons/markdown' - - + + } title="Organize Files" href="/docs/guide/organize-files"/> @@ -14,21 +14,20 @@ import markdownIcon from '@components/icons/markdown' } title="Next.js SSG" href="/docs/guide/ssg"/> - - + + } title="Next.js I18n" href="/docs/guide/i18n"/> - - + + } title="Next.js Image" href="/docs/guide/image"/> - - + + } title="Next.js Link" href="/docs/guide/link"/> - - + + } title="TypeScript" href="/docs/guide/typescript"/> - - - + + } title="Advanced" href="/docs/guide/advanced"/> diff --git a/docs/pages/docs/guide/organize-files.mdx b/docs/pages/docs/guide/organize-files.mdx index 236d2ebf85..7a03dff136 100644 --- a/docs/pages/docs/guide/organize-files.mdx +++ b/docs/pages/docs/guide/organize-files.mdx @@ -91,14 +91,10 @@ The extra configurations are passed to the **theme** as additional information. import { Card, Cards } from '@components/card' - - - - } title="Docs Theme →" href="/docs/docs-theme/page-configuration"/> - - - - } title="Blog Theme →" href="/docs/blog-theme/page-configuration"/> + + +} title="Docs Theme →" href="/docs/docs-theme/page-configuration"/> + + +} title="Blog Theme →" href="/docs/blog-theme/page-configuration"/> diff --git a/docs/pages/docs/index.mdx b/docs/pages/docs/index.mdx index d4ef594665..860cfdffca 100644 --- a/docs/pages/docs/index.mdx +++ b/docs/pages/docs/index.mdx @@ -27,6 +27,7 @@ To start using Nextra, you need to select a theme first: If you want to use Nextra without a preset theme, or build your own theme, you can follow the [Custom Theme](/docs/custom-theme) docs. +
## Catalog
@@ -46,3 +47,4 @@ If you want to use Nextra without a preset theme, or build your own theme, you c Can I use the docs theme but also create a blog? Yes, (todo)
+
\ No newline at end of file diff --git a/docs/theme.config.tsx b/docs/theme.config.tsx index 6a3790e47d..1634198344 100644 --- a/docs/theme.config.tsx +++ b/docs/theme.config.tsx @@ -102,7 +102,8 @@ const config: DocsThemeConfig = { return {title}!!!! } return <>{title} - } + }, + defaultMenuCollapseLevel: 0 } }