Bias template/tutorial to use .mdx

This commit is contained in:
sebastienlorber 2023-01-04 20:12:10 +01:00
parent 3adc4ea809
commit 002ea367e7
13 changed files with 18 additions and 18 deletions

View file

@ -8,7 +8,7 @@ You have just learned the **basics of Docusaurus** and made some changes to the
Docusaurus has **much more to offer**!
Have **5 more minutes**? Take a look at **[versioning](../tutorial-extras/manage-docs-versions.md)** and **[i18n](../tutorial-extras/translate-your-site.md)**.
Have **5 more minutes**? Take a look at **[versioning](../tutorial-extras/manage-docs-versions.mdx)** and **[i18n](../tutorial-extras/translate-your-site.mdx)**.
Anything **unclear** or **buggy** in this tutorial? [Please report it!](https://github.com/facebook/docusaurus/discussions/4610)

View file

@ -8,7 +8,7 @@ Docusaurus creates a **page for each blog post**, but also a **blog index page**
## Create your first Post
Create a file at `blog/2021-02-28-greetings.md`:
Create a file at `blog/2021-02-28-greetings.mdx`:
```md title="blog/2021-02-28-greetings.md"
---

View file

@ -7,7 +7,7 @@ sidebar_position: 1
Add **Markdown or React** files to `src/pages` to create a **standalone page**:
- `src/pages/index.js` → `localhost:3000/`
- `src/pages/foo.md` → `localhost:3000/foo`
- `src/pages/foo.mdx` → `localhost:3000/foo`
- `src/pages/foo/bar.js` → `localhost:3000/foo/bar`
## Create your first React Page
@ -32,9 +32,9 @@ A new page is now available at [http://localhost:3000/my-react-page](http://loca
## Create your first Markdown Page
Create a file at `src/pages/my-markdown-page.md`:
Create a file at `src/pages/my-markdown-page.mdx`:
```mdx title="src/pages/my-markdown-page.md"
```mdx title="src/pages/my-markdown-page.mdx"
# My Markdown page
This is a Markdown page

View file

@ -10,7 +10,7 @@ Docusaurus supports **[Markdown](https://daringfireball.net/projects/markdown/sy
Markdown documents have metadata at the top called [Front Matter](https://jekyllrb.com/docs/front-matter/):
```text title="my-doc.md"
```text title="my-doc.mdx"
// highlight-start
---
id: my-doc-id
@ -22,7 +22,7 @@ slug: /my-custom-url
## Markdown heading
Markdown text with [links](./hello.md)
Markdown text with [links](./hello.mdx)
```
## Links
@ -34,10 +34,10 @@ Let's see how to [Create a page](/create-a-page).
```
```md
Let's see how to [Create a page](./create-a-page.md).
Let's see how to [Create a page](./create-a-page.mdx).
```
**Result:** Let's see how to [Create a page](./create-a-page.md).
**Result:** Let's see how to [Create a page](./create-a-page.mdx).
## Images