File tree 8 files changed +256
-0
lines changed
zh/reference/default-theme
8 files changed +256
-0
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,7 @@ export const en: NavbarConfig = [
35
35
'/reference/default-theme/config.md' ,
36
36
'/reference/default-theme/frontmatter.md' ,
37
37
'/reference/default-theme/components.md' ,
38
+ '/reference/default-theme/markdown.md' ,
38
39
] ,
39
40
} ,
40
41
{
Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ export const zh: NavbarConfig = [
32
32
'/zh/reference/default-theme/config.md' ,
33
33
'/zh/reference/default-theme/frontmatter.md' ,
34
34
'/zh/reference/default-theme/components.md' ,
35
+ '/zh/reference/default-theme/markdown.md' ,
35
36
] ,
36
37
} ,
37
38
{
Original file line number Diff line number Diff line change @@ -60,6 +60,7 @@ export const en: SidebarConfig = {
60
60
'/reference/default-theme/config.md' ,
61
61
'/reference/default-theme/frontmatter.md' ,
62
62
'/reference/default-theme/components.md' ,
63
+ '/reference/default-theme/markdown.md' ,
63
64
] ,
64
65
} ,
65
66
] ,
Original file line number Diff line number Diff line change @@ -63,6 +63,7 @@ export const zh: SidebarConfig = {
63
63
'/zh/reference/default-theme/config.md' ,
64
64
'/zh/reference/default-theme/frontmatter.md' ,
65
65
'/zh/reference/default-theme/components.md' ,
66
+ '/zh/reference/default-theme/markdown.md' ,
66
67
] ,
67
68
} ,
68
69
] ,
Original file line number Diff line number Diff line change @@ -101,4 +101,6 @@ You must add an empty line between the starting tag of `<CodeGroupItem>` and the
101
101
All content must be valid Markdown first, and then a Vue SFC.
102
102
103
103
Learn more: [ Advanced > Markdown and Vue SFC] ( ../../guide/advanced/markdown.md )
104
+
105
+ Alternatively, you can use the [ custom containers] ( ./markdown.md#custom-containers ) .
104
106
:::
Original file line number Diff line number Diff line change
1
+ # Markdown
2
+
3
+ ## Custom Containers
4
+
5
+ - Usage:
6
+
7
+ ``` md
8
+ ::: <type> [title]
9
+ [content]
10
+ :::
11
+ ```
12
+
13
+ The ` type ` is required, and the ` title ` and ` content ` are optional.
14
+
15
+ Supported ` type ` :
16
+ - ` tip `
17
+ - ` warning `
18
+ - ` danger `
19
+ - ` details `
20
+ - Alias of [ CodeGroup] ( ./components.md#codegroup ) and [ CodeGroupItem] ( ./components.md#codegroupitem ) :
21
+ - ` code-group `
22
+ - ` code-group-item `
23
+
24
+ - Example 1 (default title):
25
+
26
+ ** Input**
27
+
28
+ ``` md
29
+ ::: tip
30
+ This is a tip
31
+ :::
32
+
33
+ ::: warning
34
+ This is a warning
35
+ :::
36
+
37
+ ::: danger
38
+ This is a dangerous warning
39
+ :::
40
+
41
+ ::: details
42
+ This is a details block, which does not work in IE / Edge
43
+ :::
44
+ ```
45
+
46
+ ** Output**
47
+
48
+ ::: tip
49
+ This is a tip
50
+ :::
51
+
52
+ ::: warning
53
+ This is a warning
54
+ :::
55
+
56
+ ::: danger
57
+ This is a dangerous warning
58
+ :::
59
+
60
+ ::: details
61
+ This is a details block, which does not work in IE / Edge
62
+ :::
63
+
64
+ - Example 2 (custom title):
65
+
66
+ ** Input**
67
+
68
+ ```` md
69
+ ::: danger STOP
70
+ Danger zone, do not proceed
71
+ :::
72
+
73
+ ::: details Click me to view the code
74
+ ```js
75
+ console.log('Hello, VuePress!')
76
+ ```
77
+ :::
78
+ ````
79
+
80
+ ** Output**
81
+
82
+ ::: danger STOP
83
+ Danger zone, do not proceed
84
+ :::
85
+
86
+ ::: details Click me to view the code
87
+ ``` js
88
+ console .log (' Hello, VuePress!' )
89
+ ```
90
+ :::
91
+
92
+ - Example 3 (code group alias):
93
+
94
+ ** Input**
95
+
96
+ ```` md
97
+ :::: code-group
98
+ ::: code-group-item FOO
99
+ ```js
100
+ const foo = 'foo'
101
+ ```
102
+ :::
103
+ ::: code-group-item BAR
104
+ ```js
105
+ const bar = 'bar'
106
+ ```
107
+ :::
108
+ ::::
109
+ ````
110
+
111
+ ** Output**
112
+
113
+ :::: code-group
114
+ ::: code-group-item FOO
115
+ ``` js
116
+ const foo = ' foo'
117
+ ```
118
+ :::
119
+ ::: code-group-item BAR
120
+ ``` js
121
+ const bar = ' bar'
122
+ ```
123
+ :::
124
+ ::::
Original file line number Diff line number Diff line change @@ -101,4 +101,6 @@ npm install
101
101
所有内容首先都必须是合法的 Markdown ,然后才是一个 Vue SFC 。
102
102
103
103
了解更多: [ 深入 > Markdown 与 Vue SFC] ( ../../guide/advanced/markdown.md )
104
+
105
+ 或者你可以选择使用 [ 自定义容器] ( ./markdown.md#自定义容器 ) 。
104
106
:::
Original file line number Diff line number Diff line change
1
+ # Markdown
2
+
3
+ ## 自定义容器
4
+
5
+ - 使用:
6
+
7
+ ``` md
8
+ ::: <type> [title]
9
+ [content]
10
+ :::
11
+ ```
12
+
13
+ ` type ` 是必需的, ` title ` 和 ` content ` 是可选的。
14
+
15
+ 支持的 ` type ` 有:
16
+ - ` tip `
17
+ - ` warning `
18
+ - ` danger `
19
+ - ` details `
20
+ - [ CodeGroup] ( ./components.md#codegroup ) 和 [ CodeGroupItem] ( ./components.md#codegroupitem ) 的别名:
21
+ - ` code-group `
22
+ - ` code-group-item `
23
+
24
+ - 示例 1 (默认标题):
25
+
26
+ ** 输入**
27
+
28
+ ``` md
29
+ ::: tip
30
+ 这是一个提示
31
+ :::
32
+
33
+ ::: warning
34
+ 这是一个警告
35
+ :::
36
+
37
+ ::: danger
38
+ 这是一个危险警告
39
+ :::
40
+
41
+ ::: details
42
+ 这是一个 details 标签,在 IE / Edge 中不生效
43
+ :::
44
+ ```
45
+
46
+ ** 输出**
47
+
48
+ ::: tip
49
+ 这是一个提示
50
+ :::
51
+
52
+ ::: warning
53
+ 这是一个警告
54
+ :::
55
+
56
+ ::: danger
57
+ 这是一个危险警告
58
+ :::
59
+
60
+ ::: details
61
+ 这是一个 details 标签,在 IE / Edge 中不生效
62
+ :::
63
+
64
+ - 示例 2 (自定义标题):
65
+
66
+ ** 输入**
67
+
68
+ ```` md
69
+ ::: danger STOP
70
+ 危险区域,禁止通行
71
+ :::
72
+
73
+ ::: details 点击查看代码
74
+ ```js
75
+ console.log('你好,VuePress!')
76
+ ```
77
+ :::
78
+ ````
79
+
80
+ ** 输出**
81
+
82
+ ::: danger STOP
83
+ 危险区域,禁止通行
84
+ :::
85
+
86
+ ::: details 点击查看代码
87
+ ``` js
88
+ console .log (' 你好,VuePress!' )
89
+ ```
90
+ :::
91
+
92
+ - 示例 3 (Code Group 别名):
93
+
94
+ ** 输入**
95
+
96
+ ```` md
97
+ :::: code-group
98
+ ::: code-group-item FOO
99
+ ```js
100
+ const foo = 'foo'
101
+ ```
102
+ :::
103
+ ::: code-group-item BAR
104
+ ```js
105
+ const bar = 'bar'
106
+ ```
107
+ :::
108
+ ::::
109
+ ````
110
+
111
+ ** 输出**
112
+
113
+ :::: code-group
114
+ ::: code-group-item FOO
115
+ ``` js
116
+ const foo = ' foo'
117
+ ```
118
+ :::
119
+ ::: code-group-item BAR
120
+ ``` js
121
+ const bar = ' bar'
122
+ ```
123
+ :::
124
+ ::::
You can’t perform that action at this time.
0 commit comments