Skip to content

Commit fda1238

Browse files
committed
feat(mermaid): add mermaid rendering support
1 parent bb2750f commit fda1238

9 files changed

Lines changed: 1444 additions & 126 deletions

File tree

docs/mdx.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,3 +153,20 @@ video.
153153
```tsx
154154
<EpicVideo url="https://www.epicweb.dev/workshops/full-stack-foundations/styling/intro-to-full-stack-foundations-workshop" />
155155
```
156+
157+
## Mermaid
158+
159+
You can use [mermaid](https://mermaid.js.org/) to create diagrams.
160+
161+
```mermaid
162+
sequenceDiagram
163+
Alice->>John: Hello John, how are you?
164+
John-->>Alice: Very Great!!!!!
165+
Alice->>John: See you later!!
166+
```
167+
168+
This is rendered on the server using a Cloudflare Worker because I can't stand
169+
things not being rendered on the server and popping in after the page has
170+
loaded!
171+
172+
If the connection is slow, the diagram will be rendered on the client.

example/exercises/01.nested-routing/01.problem.outlet/README.mdx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,15 @@ this exercise. 😌 Sup: `this is some code`
1212

1313
<LinkToApp to="/whatever">Go to whatever</LinkToApp>
1414

15+
## Mermaid
16+
17+
```mermaid
18+
sequenceDiagram
19+
Alice->>John: Hello John, how are you?
20+
John-->>Alice: Really Great!
21+
Alice->>John: See you later!!
22+
```
23+
1524
### DiffLink example
1625

1726
<DiffLink app1={0} app2={4} />

example/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
"title": "Web App Fundamentals 🔭",
66
"subtitle": "Learn the foundational tools and skills of building web applications",
77
"product": {
8-
"host": "www.epicai.pro",
8+
"host": "www.epicreact.dev",
99
"slug": "react-fundamentals",
1010
"logo": "/images/logo.svg",
11-
"displayName": "EpicAI.pro",
12-
"displayNameShort": "Epic AI",
11+
"displayName": "EpicReact.dev",
12+
"displayNameShort": "EpicReact",
1313
"discordChannelId": "1285244676286189569",
1414
"discordTags": [
1515
"1285246046498328627",

0 commit comments

Comments
 (0)