mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-22 21:47:01 +02:00
feat: upgrade to MDX v2 (#8288)
Co-authored-by: Armano <armano2@users.noreply.github.com>
This commit is contained in:
parent
10f161d578
commit
bf913aea2a
161 changed files with 4028 additions and 2821 deletions
|
@ -43,8 +43,8 @@ Generated IDs have **some limitations**:
|
|||
|
||||
A special Markdown syntax lets you set an **explicit heading id**:
|
||||
|
||||
```md
|
||||
### Hello World {#my-explicit-id}
|
||||
```mdx-code-block
|
||||
<Code language="md">{'### Hello World \u007B#my-explicit-id}\n'}</Code>
|
||||
```
|
||||
|
||||
:::tip
|
||||
|
@ -102,7 +102,7 @@ It is also possible to display an inline table of contents directly inside a Mar
|
|||
|
||||
The `toc` variable is available in any MDX document and contains all the headings of an MDX document. By default, only `h2` and `h3` headings are displayed in the TOC. You can change which heading levels are visible by setting `minHeadingLevel` or `maxHeadingLevel` for individual `TOCInline` components.
|
||||
|
||||
<!-- prettier-ignore -->
|
||||
{/* prettier-ignore */}
|
||||
```jsx
|
||||
import TOCInline from '@theme/TOCInline';
|
||||
|
||||
|
@ -129,7 +129,7 @@ declare const toc: {
|
|||
|
||||
Note that the `toc` global is a flat array, so you can easily cut out unwanted nodes or insert extra nodes, and create a new TOC tree.
|
||||
|
||||
<!-- prettier-ignore -->
|
||||
{/* prettier-ignore */}
|
||||
```jsx
|
||||
import TOCInline from '@theme/TOCInline';
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue