Skip to content

Commit 4d5aac7

Browse files
committed
Added documentation on how to use Mermaid in MDX.
1 parent 4dd3820 commit 4d5aac7

File tree

7 files changed

+29
-2
lines changed

7 files changed

+29
-2
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
title: Charts & Diagrams
3+
noindex: true
4+
sidebar_order: 30
5+
---
6+
7+
You can render charts and diagrams in you MDX files using [Mermaid](https://mermaid.js.org):
8+
9+
````txt {tabTitle:Example}
10+
```mermaid
11+
flowchart TD
12+
Start --> Stop
13+
```
14+
````
15+
16+
Will turn into this:
17+
18+
```mermaid
19+
flowchart TD
20+
Start --> Stop
21+
```
22+
23+
See the [Mermaid documentation](https://mermaid.js.org/intro/) to learn what types of charts and diagrams can be rendered.

docs/contributing/pages/components.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
title: MDX Components
33
noindex: true
4+
sidebar_order: 40
45
---
56

67
## Alert

docs/contributing/pages/frontmatter.mdx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
title: Frontmatter
33
noindex: true
4+
sidebar_order: 10
45
---
56

67
Frontmatter a YAML-formatted blob defined at the top of every markdown or mdx file:
@@ -55,5 +56,3 @@ Overrides the next page shown in the bottom pagination navigation.
5556
`previousPage` (`{ path: 'path/to/page', title: 'Page Title' }`)
5657

5758
Overrides the previous page shown in the bottom pagination navigation.
58-
59-

docs/contributing/pages/images.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
title: Images
33
noindex: true
4+
sidebar_order: 20
45
---
56

67
If you want to add images to your docs, you can add them in a `./img` folder in the same directory as your `.mdx` files.

docs/contributing/pages/redirects.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
title: Redirects
33
noindex: true
4+
sidebar_order: 60
45
---
56

67
Redirects allow you to automatically redirect an incoming request path to a new destination path. When you move or rename a file, you should make sure to set up a redirect from the old path to the new path, so that the old URL still takes users to the right place.

docs/contributing/pages/search.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
title: Search
33
noindex: true
4+
sidebar_order: 70
45
---
56

67
Search is powered by Algolia, and will index all content in `/docs/` that is Markdown or MDX formatted.

docs/contributing/pages/variables.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
title: Markdown Variables
33
noindex: true
4+
sidebar_order: 50
45
---
56

67
A transformation is exposed to both Markdown and MDX files which supports processing variables in a Django/Jekyll-style way.

0 commit comments

Comments
 (0)