Skip to content

Commit 3c9e769

Browse files
committed
add some docs
1 parent 964bda3 commit 3c9e769

File tree

2 files changed

+53
-17
lines changed

2 files changed

+53
-17
lines changed

website/_dogfooding/_pages tests/markdownPageTests.md

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -246,25 +246,13 @@ Admonition alias `:::important` should have Important title
246246

247247
:::
248248

249-
::::info Nested Admonitions
250-
251-
Admonitions can be easily nested.
252-
253-
:::danger Child Admonition
254-
255-
Foo Bar
256-
257-
:::
258-
259-
::::
260-
261-
:::::note Your title
249+
:::::note title
262250

263251
Some **content** with _Markdown_ `syntax`.
264252

265-
::::note Your nested Title
253+
::::note nested Title
266254

267-
:::note Your very nested Title (does not work yet :s)
255+
:::tip very nested Title
268256

269257
Some **content** with _Markdown_ `syntax`.
270258

@@ -278,4 +266,4 @@ hey
278266

279267
:::::
280268

281-
hello
269+
after admonition

website/docs/guides/markdown-features/markdown-features-admonitions.mdx

Lines changed: 49 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,54 @@ Some **content** with _Markdown_ `syntax`.
129129
</BrowserWindow>
130130
```
131131

132+
## Nested admonitions {#nested-admonitions}
133+
134+
Admonitions can be nested. Use more colons `:` for each parent admonition level.
135+
136+
```md
137+
:::::info Parent
138+
139+
Parent content
140+
141+
::::danger Child
142+
143+
Child content
144+
145+
:::tip Deep Child
146+
147+
Deep child content
148+
149+
:::
150+
151+
::::
152+
153+
:::::
154+
```
155+
156+
```mdx-code-block
157+
<BrowserWindow>
158+
159+
:::::info Parent
160+
161+
Parent content
162+
163+
::::danger Child
164+
165+
Child content
166+
167+
:::tip Deep Child
168+
169+
Deep child content
170+
171+
:::
172+
173+
::::
174+
175+
:::::
176+
177+
</BrowserWindow>
178+
```
179+
132180
## Admonitions with MDX {#admonitions-with-mdx}
133181

134182
You can use MDX inside admonitions too!
@@ -308,7 +356,7 @@ const AdmonitionTypes = {
308356
};
309357

310358
export default AdmonitionTypes;
311-
````
359+
```
312360

313361
Now you can use your new admonition keyword in a Markdown file, and it will be parsed and rendered with your custom logic:
314362

0 commit comments

Comments
 (0)