Skip to content

docs: refine Markdown Extensions Custom Containers(fix #2141) #2351

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 13, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion packages/docs/docs/guide/markdown.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,9 @@ Rendering of TOC can be configured using the [`markdown.toc`](../config/README.m

## Custom Containers <Badge text="default theme"/>

Custom containers can be defined by their types, titles, and contents.

### Default Title
**Input**

```md
Expand Down Expand Up @@ -159,7 +162,8 @@ This is a dangerous warning
This is a details block, which does not work in IE / Edge
:::

You can also customize the title of the block:
### Custom Title
**Input**

````md
::: danger STOP
Expand All @@ -173,6 +177,8 @@ console.log('Hello, VuePress!')
:::
````

**Output**

::: danger STOP
Danger zone, do not proceed
:::
Expand Down