mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-10 15:47:23 +02:00
docs: "Preparing your site for Docusaurus v3" blog post (#9333)
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
This commit is contained in:
parent
bde9cfd84d
commit
e9e4635d76
5 changed files with 542 additions and 4 deletions
|
@ -229,7 +229,7 @@ If you don't wrap your imported MDX with `MDXContent`, the global scope will not
|
|||
|
||||
Docusaurus v3 is using [MDX v2](https://mdxjs.com/blog/v2/).
|
||||
|
||||
The [MDX syntax](https://mdxjs.com/docs/what-is-mdx/#mdx-syntax) is mostly compatible with [CommonMark](https://commonmark.org/), but is much stricter because your `.mdx` files are compiled into real React components (check the [playground](https://mdxjs.com/playground/)).
|
||||
The [MDX syntax](https://mdxjs.com/docs/what-is-mdx/#mdx-syntax) is mostly compatible with [CommonMark](https://commonmark.org/), but is much stricter because your `.mdx` files can use JSX and are compiled into real React components (check the [playground](https://mdxjs.com/playground/)).
|
||||
|
||||
Some valid CommonMark features won't work with MDX ([more info](https://mdxjs.com/docs/what-is-mdx/#markdown)), notably:
|
||||
|
||||
|
@ -238,12 +238,14 @@ Some valid CommonMark features won't work with MDX ([more info](https://mdxjs.co
|
|||
- HTML syntax (`<p style="color: red;">`): use JSX instead (`<p style={{color: 'red'}}>`)
|
||||
- Unescaped `{` and `<`: escape them with `\` instead (`\{` and `\<`)
|
||||
|
||||
:::tip
|
||||
:::danger Experimental CommonMark support
|
||||
|
||||
In case you need a less strict format, with [CommonMark](https://commonmark.org/) compatibility, you can use:
|
||||
Docusaurus v3 makes it possible to opt-in for a less strict, standard [CommonMark](https://commonmark.org/) support with the following options:
|
||||
|
||||
- The `.md` file extension instead of `.mdx`
|
||||
- The `format: md` front matter
|
||||
- The `.md` file extension combined with the `siteConfig.markdown.format: "detect"` configuration
|
||||
|
||||
This feature is **experimental** and currently has a few [limitations](https://github.com/facebook/docusaurus/issues/9092).
|
||||
|
||||
:::
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue