mirror of
https://github.com/facebook/docusaurus.git
synced 2025-07-16 00:06:11 +02:00
tutorial: explain .mdx better
This commit is contained in:
parent
8ab654d028
commit
bc680e280a
3 changed files with 10 additions and 2 deletions
|
@ -4,7 +4,7 @@ sidebar_position: 1
|
|||
|
||||
# Create a Page
|
||||
|
||||
Add **Markdown or React** files to `src/pages` to create a **standalone page**:
|
||||
Add **Markdown ([MDX](https://mdxjs.com/)) or React** files to `src/pages` to create a **standalone page**:
|
||||
|
||||
- `src/pages/index.js` → `localhost:3000/`
|
||||
- `src/pages/foo.mdx` → `localhost:3000/foo`
|
||||
|
|
|
@ -6,6 +6,14 @@ sidebar_position: 4
|
|||
|
||||
Docusaurus supports **[Markdown](https://daringfireball.net/projects/markdown/syntax)** and a few **additional features**.
|
||||
|
||||
:::info
|
||||
|
||||
Docusaurus is based on **[MDX](https://mdxjs.com/)**. It allows you to use **[React and JSX](https://reactjs.org/docs/introducing-jsx.html)** in your Markdown documents.
|
||||
|
||||
You can use both `.md` and `.mdx` file extensions. We **recommend using the `.mdx` extension by default** and whenever using any advanced feature not included in [CommonMark](https://commonmark.org/): admonitions, tabs, React, JSX...
|
||||
|
||||
:::
|
||||
|
||||
## Front Matter
|
||||
|
||||
Markdown documents have metadata at the top called [Front Matter](https://jekyllrb.com/docs/front-matter/):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue