refactor: make MDX export a flat TOC list instead of tree (#6729)

This commit is contained in:
Joshua Chen 2022-02-23 22:12:04 +08:00 committed by GitHub
parent 2d93750caf
commit c3370be64d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
20 changed files with 312 additions and 445 deletions

View file

@ -25,12 +25,6 @@ Once your website is bootstrapped, the website source will contain the Docusauru
}
```
## Index {#index}
import TOCInline from "@theme/TOCInline"
<TOCInline toc={toc[1].children}/>
## Docusaurus CLI commands {#docusaurus-cli-commands}
Below is a list of Docusaurus CLI commands and their usages:

View file

@ -17,7 +17,7 @@ However, it can be helpful if you have a high-level understanding of how the con
The high-level overview of Docusaurus configuration can be categorized into:
<TOCInline toc={toc[0].children} />
<TOCInline toc={toc} minHeadingLevel={3} maxHeadingLevel={3} />
For exact reference to each of the configurable fields, you may refer to [**`docusaurus.config.js` API reference**](api/docusaurus.config.js.md).

View file

@ -59,14 +59,6 @@ import TOCInline from '@theme/TOCInline';
/>;
```
```mdx-code-block
<BrowserWindow>
<TOCInline toc={[toc[2], toc[4]]} />
</BrowserWindow>
```
---
:::caution

View file

@ -25,12 +25,6 @@ Once your website is bootstrapped, the website source will contain the Docusauru
}
```
## Index {#index}
import TOCInline from "@theme/TOCInline"
<TOCInline toc={toc[1].children}/>
## Docusaurus CLI commands {#docusaurus-cli-commands}
Below is a list of Docusaurus CLI commands and their usages:

View file

@ -17,7 +17,7 @@ However, it can be helpful if you have a high-level understanding of how the con
The high-level overview of Docusaurus configuration can be categorized into:
<TOCInline toc={toc[0].children} />
<TOCInline toc={toc} minHeadingLevel={3} maxHeadingLevel={3} />
For exact reference to each of the configurable fields, you may refer to [**`docusaurus.config.js` API reference**](api/docusaurus.config.js.md).

View file

@ -59,12 +59,6 @@ import TOCInline from '@theme/TOCInline';
/>;
```
```mdx-code-block
<BrowserWindow>
<TOCInline toc={[toc[2], toc[4]]} />
</BrowserWindow>
```
---
:::caution