GitHub 风格的提醒 #
md
> [!NOTE]
> Highlights information that users should take into account, even when skimming.
> [!TIP]
> Optional information to help a user be more successful.
> [!IMPORTANT]
> Crucial information necessary for users to succeed.
> [!WARNING]
> Critical content demanding immediate user attention due to potential risks.
> [!CAUTION]
> Negative potential consequences of an action.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
2
3
4
5
6
7
8
9
10
11
12
13
14
Note
Highlights information that users should take into account, even when skimming.
Tip
Optional information to help a user be more successful.
Important
Crucial information necessary for users to succeed.
Warning
Critical content demanding immediate user attention due to potential risks.
Caution
Negative potential consequences of an action.
容器 #
md
::: info
This is an info box.
:::
::: tip
This is a tip.
:::
::: warning
This is a warning.
:::
::: danger
This is a dangerous warning.
:::
::: details
This is a details block.
:::
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
INFOLABEL
This is an info box.
TIPLABEL
This is a tip.
WARNINGLABEL
This is a warning.
DANGERLABEL
This is a dangerous warning.
DETAILSLABEL
This is a details block.
代码组 #
md
::: code-group
:::
1
2
2
js
/**
* @type {import('vitepress').UserConfig}
*/
const config = {
// ...
}
export default config
1
2
3
4
5
6
7
8
2
3
4
5
6
7
8
ts
import type { UserConfig } from 'vitepress'
const config: UserConfig = {
// ...
}
export default config
1
2
3
4
5
6
7
2
3
4
5
6
7