create-vuepress-theme-hope 2.0.0-beta.98 → 2.0.0-beta.99
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/template/en-US/.vuepress/theme.ts +36 -1
- package/template/en-US/guide/markdown.md +52 -49
- package/template/i18n/.vuepress/theme.ts +36 -1
- package/template/i18n/guide/markdown.md +52 -51
- package/template/i18n/zh/guide/markdown.md +50 -49
- package/template/zh-CN/.vuepress/theme.ts +36 -1
- package/template/zh-CN/guide/markdown.md +50 -49
package/package.json
CHANGED
|
@@ -104,10 +104,45 @@ export default hopeTheme({
|
|
|
104
104
|
},
|
|
105
105
|
|
|
106
106
|
mdEnhance: {
|
|
107
|
-
|
|
107
|
+
align: true,
|
|
108
|
+
attrs: true,
|
|
109
|
+
chart: true,
|
|
110
|
+
codetabs: true,
|
|
111
|
+
container: true,
|
|
112
|
+
demo: true,
|
|
113
|
+
echarts: true,
|
|
114
|
+
flowchart: true,
|
|
115
|
+
gfm: true,
|
|
116
|
+
imageSize: true,
|
|
117
|
+
include: true,
|
|
118
|
+
lazyLoad: true,
|
|
119
|
+
mark: true,
|
|
120
|
+
mermaid: true,
|
|
121
|
+
playground: {
|
|
122
|
+
presets: ["ts", "vue"],
|
|
123
|
+
},
|
|
108
124
|
presentation: {
|
|
109
125
|
plugins: ["highlight", "math", "search", "notes", "zoom"],
|
|
110
126
|
},
|
|
127
|
+
stylize: [
|
|
128
|
+
{
|
|
129
|
+
matcher: "Recommanded",
|
|
130
|
+
replacer: ({ tag }) => {
|
|
131
|
+
if (tag === "em")
|
|
132
|
+
return {
|
|
133
|
+
tag: "Badge",
|
|
134
|
+
attrs: { type: "tip" },
|
|
135
|
+
content: "Recommanded",
|
|
136
|
+
};
|
|
137
|
+
},
|
|
138
|
+
},
|
|
139
|
+
],
|
|
140
|
+
sub: true,
|
|
141
|
+
sup: true,
|
|
142
|
+
tabs: true,
|
|
143
|
+
tex: true,
|
|
144
|
+
vpre: true,
|
|
145
|
+
vuePlayground: true,
|
|
111
146
|
},
|
|
112
147
|
},
|
|
113
148
|
});
|
|
@@ -42,48 +42,6 @@ For these extensions, please read [Markdown extensions in VuePress](https://vuep
|
|
|
42
42
|
|
|
43
43
|
By using [`vuepress-plugin-md-enhance`][md-enhance], the theme extends more Markdown syntax and provides richer writing functions.
|
|
44
44
|
|
|
45
|
-
:::: tip Enable all
|
|
46
|
-
|
|
47
|
-
You can set `plugins.mdEnhance.enableAll: true` in theme options to enable all features of the [md-enhance][md-enhance] plugin.
|
|
48
|
-
|
|
49
|
-
::: code-tabs#language
|
|
50
|
-
|
|
51
|
-
@tab TS
|
|
52
|
-
|
|
53
|
-
```ts
|
|
54
|
-
import { hopeTheme } from "vuepress-theme-hope";
|
|
55
|
-
|
|
56
|
-
export default {
|
|
57
|
-
theme: hopeTheme({
|
|
58
|
-
plugins: {
|
|
59
|
-
mdEnhance: {
|
|
60
|
-
enableAll: true,
|
|
61
|
-
},
|
|
62
|
-
},
|
|
63
|
-
}),
|
|
64
|
-
};
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
@tab JS
|
|
68
|
-
|
|
69
|
-
```js
|
|
70
|
-
import { hopeTheme } from "vuepress-theme-hope";
|
|
71
|
-
|
|
72
|
-
export default {
|
|
73
|
-
theme: hopeTheme({
|
|
74
|
-
plugins: {
|
|
75
|
-
mdEnhance: {
|
|
76
|
-
enableAll: true,
|
|
77
|
-
},
|
|
78
|
-
},
|
|
79
|
-
}),
|
|
80
|
-
};
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
:::
|
|
84
|
-
|
|
85
|
-
::::
|
|
86
|
-
|
|
87
45
|
#### Custom Container
|
|
88
46
|
|
|
89
47
|
::: v-pre
|
|
@@ -170,7 +128,7 @@ A custom details container
|
|
|
170
128
|
|
|
171
129
|
- [View Detail](https://vuepress-theme-hope.github.io/v2/guide/markdown/container.html)
|
|
172
130
|
|
|
173
|
-
|
|
131
|
+
#### Tabs
|
|
174
132
|
|
|
175
133
|
::: tabs#fruit
|
|
176
134
|
|
|
@@ -192,7 +150,7 @@ Orange
|
|
|
192
150
|
|
|
193
151
|
#### Code Tabs
|
|
194
152
|
|
|
195
|
-
::: code-tabs
|
|
153
|
+
::: code-tabs#shell
|
|
196
154
|
|
|
197
155
|
@tab pnpm
|
|
198
156
|
|
|
@@ -238,6 +196,12 @@ I am right align
|
|
|
238
196
|
|
|
239
197
|
- [View Detail](https://vuepress-theme-hope.github.io/v2/guide/markdown/align.html)
|
|
240
198
|
|
|
199
|
+
#### Attrs
|
|
200
|
+
|
|
201
|
+
A **word**{#word} having id.
|
|
202
|
+
|
|
203
|
+
- [View Detail](https://vuepress-theme-hope.github.io/v2/guide/markdown/attrs.html)
|
|
204
|
+
|
|
241
205
|
#### Footnote
|
|
242
206
|
|
|
243
207
|
This text has footnote[^first].
|
|
@@ -263,7 +227,7 @@ You can mark ==important words== .
|
|
|
263
227
|
|
|
264
228
|
Support setting color scheme and size
|
|
265
229
|
|
|
266
|
-
- [View Detail](https://vuepress-theme-hope.github.io/v2/guide/markdown/image.
|
|
230
|
+
- [View Detail](https://vuepress-theme-hope.github.io/v2/guide/markdown/image.html)
|
|
267
231
|
|
|
268
232
|
#### Chart
|
|
269
233
|
|
|
@@ -374,7 +338,7 @@ $$
|
|
|
374
338
|
|
|
375
339
|
@include(./README.md{11-17})
|
|
376
340
|
|
|
377
|
-
- [View Detail](https://vuepress-theme-hope.github.io/v2/guide/markdown/include.
|
|
341
|
+
- [View Detail](https://vuepress-theme-hope.github.io/v2/guide/markdown/include.html)
|
|
378
342
|
|
|
379
343
|
#### Code Demo
|
|
380
344
|
|
|
@@ -403,11 +367,50 @@ span {
|
|
|
403
367
|
|
|
404
368
|
#### Stylize
|
|
405
369
|
|
|
406
|
-
|
|
370
|
+
Donate Mr.Hope a cup of coffee. _Recommanded_
|
|
371
|
+
|
|
372
|
+
- [View Detail](https://vuepress-theme-hope.github.io/v2/guide/markdown/stylize.html)
|
|
407
373
|
|
|
408
|
-
|
|
374
|
+
#### Playground
|
|
375
|
+
|
|
376
|
+
::: playground#ts TS demo
|
|
377
|
+
|
|
378
|
+
@file index.ts
|
|
379
|
+
|
|
380
|
+
```ts
|
|
381
|
+
const msg = "hello world";
|
|
382
|
+
|
|
383
|
+
const speak = (msg: string) => console.log(msg);
|
|
384
|
+
|
|
385
|
+
speak(msg);
|
|
386
|
+
```
|
|
387
|
+
|
|
388
|
+
:::
|
|
389
|
+
|
|
390
|
+
- [View Detail](https://vuepress-theme-hope.github.io/v2/guide/markdown/playground.html)
|
|
391
|
+
|
|
392
|
+
#### Vue Playground
|
|
393
|
+
|
|
394
|
+
::: vue-playground Vue Playground
|
|
395
|
+
|
|
396
|
+
@file App.vue
|
|
397
|
+
|
|
398
|
+
```vue
|
|
399
|
+
<script setup>
|
|
400
|
+
import { ref } from "vue";
|
|
401
|
+
|
|
402
|
+
const msg = ref("Hello World!");
|
|
403
|
+
</script>
|
|
404
|
+
|
|
405
|
+
<template>
|
|
406
|
+
<h1>{{ msg }}</h1>
|
|
407
|
+
<input v-model="msg" />
|
|
408
|
+
</template>
|
|
409
|
+
```
|
|
410
|
+
|
|
411
|
+
:::
|
|
409
412
|
|
|
410
|
-
- [View Detail](https://vuepress-theme-hope.github.io/v2/guide/markdown/
|
|
413
|
+
- [View Detail](https://vuepress-theme-hope.github.io/v2/guide/markdown/vue-playground.html)
|
|
411
414
|
|
|
412
415
|
#### Presentation
|
|
413
416
|
|
|
@@ -132,10 +132,45 @@ export default hopeTheme({
|
|
|
132
132
|
},
|
|
133
133
|
|
|
134
134
|
mdEnhance: {
|
|
135
|
-
|
|
135
|
+
align: true,
|
|
136
|
+
attrs: true,
|
|
137
|
+
chart: true,
|
|
138
|
+
codetabs: true,
|
|
139
|
+
container: true,
|
|
140
|
+
demo: true,
|
|
141
|
+
echarts: true,
|
|
142
|
+
flowchart: true,
|
|
143
|
+
gfm: true,
|
|
144
|
+
imageSize: true,
|
|
145
|
+
include: true,
|
|
146
|
+
lazyLoad: true,
|
|
147
|
+
mark: true,
|
|
148
|
+
mermaid: true,
|
|
149
|
+
playground: {
|
|
150
|
+
presets: ["ts", "vue"],
|
|
151
|
+
},
|
|
136
152
|
presentation: {
|
|
137
153
|
plugins: ["highlight", "math", "search", "notes", "zoom"],
|
|
138
154
|
},
|
|
155
|
+
stylize: [
|
|
156
|
+
{
|
|
157
|
+
matcher: "Recommanded",
|
|
158
|
+
replacer: ({ tag }) => {
|
|
159
|
+
if (tag === "em")
|
|
160
|
+
return {
|
|
161
|
+
tag: "Badge",
|
|
162
|
+
attrs: { type: "tip" },
|
|
163
|
+
content: "Recommanded",
|
|
164
|
+
};
|
|
165
|
+
},
|
|
166
|
+
},
|
|
167
|
+
],
|
|
168
|
+
sub: true,
|
|
169
|
+
sup: true,
|
|
170
|
+
tabs: true,
|
|
171
|
+
tex: true,
|
|
172
|
+
vpre: true,
|
|
173
|
+
vuePlayground: true,
|
|
139
174
|
},
|
|
140
175
|
},
|
|
141
176
|
});
|
|
@@ -42,48 +42,6 @@ For these extensions, please read [Markdown extensions in VuePress](https://vuep
|
|
|
42
42
|
|
|
43
43
|
By using [`vuepress-plugin-md-enhance`][md-enhance], the theme extends more Markdown syntax and provides richer writing functions.
|
|
44
44
|
|
|
45
|
-
:::: tip Enable all
|
|
46
|
-
|
|
47
|
-
You can set `plugins.mdEnhance.enableAll: true` in theme options to enable all features of the [md-enhance][md-enhance] plugin.
|
|
48
|
-
|
|
49
|
-
::: code-tabs#language
|
|
50
|
-
|
|
51
|
-
@tab TS
|
|
52
|
-
|
|
53
|
-
```ts
|
|
54
|
-
import { hopeTheme } from "vuepress-theme-hope";
|
|
55
|
-
|
|
56
|
-
export default {
|
|
57
|
-
theme: hopeTheme({
|
|
58
|
-
plugins: {
|
|
59
|
-
mdEnhance: {
|
|
60
|
-
enableAll: true,
|
|
61
|
-
},
|
|
62
|
-
},
|
|
63
|
-
}),
|
|
64
|
-
};
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
@tab JS
|
|
68
|
-
|
|
69
|
-
```js
|
|
70
|
-
import { hopeTheme } from "vuepress-theme-hope";
|
|
71
|
-
|
|
72
|
-
export default {
|
|
73
|
-
theme: hopeTheme({
|
|
74
|
-
plugins: {
|
|
75
|
-
mdEnhance: {
|
|
76
|
-
enableAll: true,
|
|
77
|
-
},
|
|
78
|
-
},
|
|
79
|
-
}),
|
|
80
|
-
};
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
:::
|
|
84
|
-
|
|
85
|
-
::::
|
|
86
|
-
|
|
87
45
|
#### Custom Container
|
|
88
46
|
|
|
89
47
|
::: v-pre
|
|
@@ -170,7 +128,7 @@ A custom details container
|
|
|
170
128
|
|
|
171
129
|
- [View Detail](https://vuepress-theme-hope.github.io/v2/guide/markdown/container.html)
|
|
172
130
|
|
|
173
|
-
|
|
131
|
+
#### Tabs
|
|
174
132
|
|
|
175
133
|
::: tabs#fruit
|
|
176
134
|
|
|
@@ -192,7 +150,7 @@ Orange
|
|
|
192
150
|
|
|
193
151
|
#### Code Tabs
|
|
194
152
|
|
|
195
|
-
::: code-tabs
|
|
153
|
+
::: code-tabs#shell
|
|
196
154
|
|
|
197
155
|
@tab pnpm
|
|
198
156
|
|
|
@@ -238,6 +196,12 @@ I am right align
|
|
|
238
196
|
|
|
239
197
|
- [View Detail](https://vuepress-theme-hope.github.io/v2/guide/markdown/align.html)
|
|
240
198
|
|
|
199
|
+
#### Attrs
|
|
200
|
+
|
|
201
|
+
A **word**{#word} having id.
|
|
202
|
+
|
|
203
|
+
- [View Detail](https://vuepress-theme-hope.github.io/v2/guide/markdown/attrs.html)
|
|
204
|
+
|
|
241
205
|
#### Footnote
|
|
242
206
|
|
|
243
207
|
This text has footnote[^first].
|
|
@@ -263,7 +227,7 @@ You can mark ==important words== .
|
|
|
263
227
|
|
|
264
228
|
Support setting color scheme and size
|
|
265
229
|
|
|
266
|
-
- [View Detail](https://vuepress-theme-hope.github.io/v2/guide/markdown/image.
|
|
230
|
+
- [View Detail](https://vuepress-theme-hope.github.io/v2/guide/markdown/image.html)
|
|
267
231
|
|
|
268
232
|
#### Chart
|
|
269
233
|
|
|
@@ -370,11 +334,11 @@ $$
|
|
|
370
334
|
|
|
371
335
|
- [View Detail](https://vuepress-theme-hope.github.io/v2/guide/markdown/tex.html)
|
|
372
336
|
|
|
373
|
-
|
|
337
|
+
#### Include files
|
|
374
338
|
|
|
375
339
|
@include(./README.md{11-17})
|
|
376
340
|
|
|
377
|
-
- [View Detail](https://vuepress-theme-hope.github.io/v2/guide/markdown/include.
|
|
341
|
+
- [View Detail](https://vuepress-theme-hope.github.io/v2/guide/markdown/include.html)
|
|
378
342
|
|
|
379
343
|
#### Code Demo
|
|
380
344
|
|
|
@@ -403,13 +367,50 @@ span {
|
|
|
403
367
|
|
|
404
368
|
#### Stylize
|
|
405
369
|
|
|
406
|
-
|
|
370
|
+
Donate Mr.Hope a cup of coffee. _Recommanded_
|
|
371
|
+
|
|
372
|
+
- [View Detail](https://vuepress-theme-hope.github.io/v2/guide/markdown/stylize.html)
|
|
407
373
|
|
|
408
|
-
|
|
374
|
+
#### Playground
|
|
409
375
|
|
|
410
|
-
|
|
376
|
+
::: playground#ts TS demo
|
|
377
|
+
|
|
378
|
+
@file index.ts
|
|
379
|
+
|
|
380
|
+
```ts
|
|
381
|
+
const msg = "hello world";
|
|
382
|
+
|
|
383
|
+
const speak = (msg: string) => console.log(msg);
|
|
384
|
+
|
|
385
|
+
speak(msg);
|
|
386
|
+
```
|
|
387
|
+
|
|
388
|
+
:::
|
|
389
|
+
|
|
390
|
+
- [View Detail](https://vuepress-theme-hope.github.io/v2/guide/markdown/playground.html)
|
|
391
|
+
|
|
392
|
+
#### Vue Playground
|
|
393
|
+
|
|
394
|
+
::: vue-playground Vue Playground
|
|
395
|
+
|
|
396
|
+
@file App.vue
|
|
397
|
+
|
|
398
|
+
```vue
|
|
399
|
+
<script setup>
|
|
400
|
+
import { ref } from "vue";
|
|
401
|
+
|
|
402
|
+
const msg = ref("Hello World!");
|
|
403
|
+
</script>
|
|
404
|
+
|
|
405
|
+
<template>
|
|
406
|
+
<h1>{{ msg }}</h1>
|
|
407
|
+
<input v-model="msg" />
|
|
408
|
+
</template>
|
|
409
|
+
```
|
|
410
|
+
|
|
411
|
+
:::
|
|
411
412
|
|
|
412
|
-
|
|
413
|
+
- [View Detail](https://vuepress-theme-hope.github.io/v2/guide/markdown/vue-playground.html)
|
|
413
414
|
|
|
414
415
|
#### Presentation
|
|
415
416
|
|
|
@@ -42,48 +42,6 @@ VuePress 会使用 [markdown-it](https://github.com/markdown-it/markdown-it) 来
|
|
|
42
42
|
|
|
43
43
|
通过 [`vuepress-plugin-md-enhance`][md-enhance],主题扩展了更多 Markdown 语法,提供更加丰富的写作功能。
|
|
44
44
|
|
|
45
|
-
:::: tip 一键启用
|
|
46
|
-
|
|
47
|
-
你可以设置在主题选项中设置 `plugins.mdEnhance.enableAll: true` 启用 [md-enhance][md-enhance] 插件的所有功能。
|
|
48
|
-
|
|
49
|
-
::: code-tabs#language
|
|
50
|
-
|
|
51
|
-
@tab TS
|
|
52
|
-
|
|
53
|
-
```ts
|
|
54
|
-
import { hopeTheme } from "vuepress-theme-hope";
|
|
55
|
-
|
|
56
|
-
export default {
|
|
57
|
-
theme: hopeTheme({
|
|
58
|
-
plugins: {
|
|
59
|
-
mdEnhance: {
|
|
60
|
-
enableAll: true,
|
|
61
|
-
},
|
|
62
|
-
},
|
|
63
|
-
}),
|
|
64
|
-
};
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
@tab JS
|
|
68
|
-
|
|
69
|
-
```js
|
|
70
|
-
import { hopeTheme } from "vuepress-theme-hope";
|
|
71
|
-
|
|
72
|
-
export default {
|
|
73
|
-
theme: hopeTheme({
|
|
74
|
-
plugins: {
|
|
75
|
-
mdEnhance: {
|
|
76
|
-
enableAll: true,
|
|
77
|
-
},
|
|
78
|
-
},
|
|
79
|
-
}),
|
|
80
|
-
};
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
:::
|
|
84
|
-
|
|
85
|
-
::::
|
|
86
|
-
|
|
87
45
|
#### 自定义容器
|
|
88
46
|
|
|
89
47
|
::: v-pre
|
|
@@ -196,6 +154,12 @@ npm i -D vuepress-theme-hope
|
|
|
196
154
|
|
|
197
155
|
- [查看详情](https://vuepress-theme-hope.github.io/v2/zh/guide/markdown/code-tabs.html)
|
|
198
156
|
|
|
157
|
+
#### 上下角标
|
|
158
|
+
|
|
159
|
+
19^th^ H~2~O
|
|
160
|
+
|
|
161
|
+
- [查看详情](https://vuepress-theme-hope.github.io/v2/zh/guide/markdown/sup-sub.html)
|
|
162
|
+
|
|
199
163
|
#### 自定义对齐
|
|
200
164
|
|
|
201
165
|
::: center
|
|
@@ -212,11 +176,11 @@ npm i -D vuepress-theme-hope
|
|
|
212
176
|
|
|
213
177
|
- [查看详情](https://vuepress-theme-hope.github.io/v2/zh/guide/markdown/align.html)
|
|
214
178
|
|
|
215
|
-
####
|
|
179
|
+
#### Attrs
|
|
216
180
|
|
|
217
|
-
|
|
181
|
+
一个拥有 ID 的 **单次**{#word}。
|
|
218
182
|
|
|
219
|
-
- [查看详情](https://vuepress-theme-hope.github.io/v2/zh/guide/markdown/
|
|
183
|
+
- [查看详情](https://vuepress-theme-hope.github.io/v2/zh/guide/markdown/attrs.html)
|
|
220
184
|
|
|
221
185
|
#### 脚注
|
|
222
186
|
|
|
@@ -383,13 +347,50 @@ span {
|
|
|
383
347
|
|
|
384
348
|
#### 样式化
|
|
385
349
|
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
设置它<span style="color:red">没有</span>任何效果,请<span style="color:red">不要</span>这样使用
|
|
350
|
+
向 Mr.Hope 捐赠一杯咖啡。 _Recommanded_
|
|
389
351
|
|
|
390
352
|
- [查看详情](https://vuepress-theme-hope.github.io/v2/zh/guide/markdown/stylize.html)
|
|
391
353
|
|
|
392
|
-
|
|
354
|
+
#### 交互演示
|
|
355
|
+
|
|
356
|
+
::: playground#ts TS 案例
|
|
357
|
+
|
|
358
|
+
@file index.ts
|
|
359
|
+
|
|
360
|
+
```ts
|
|
361
|
+
const msg = "hello world";
|
|
362
|
+
|
|
363
|
+
const speak = (msg: string) => console.log(msg);
|
|
364
|
+
|
|
365
|
+
speak(msg);
|
|
366
|
+
```
|
|
367
|
+
|
|
368
|
+
:::
|
|
369
|
+
|
|
370
|
+
- [查看详情](https://vuepress-theme-hope.github.io/v2/zh/guide/markdown/playground.html)
|
|
371
|
+
|
|
372
|
+
#### Vue 交互演示
|
|
373
|
+
|
|
374
|
+
::: vue-playground Vue 交互演示
|
|
375
|
+
|
|
376
|
+
@file App.vue
|
|
377
|
+
|
|
378
|
+
```vue
|
|
379
|
+
<script setup>
|
|
380
|
+
import { ref } from "vue";
|
|
381
|
+
|
|
382
|
+
const msg = ref("Hello World!");
|
|
383
|
+
</script>
|
|
384
|
+
|
|
385
|
+
<template>
|
|
386
|
+
<h1>{{ msg }}</h1>
|
|
387
|
+
<input v-model="msg" />
|
|
388
|
+
</template>
|
|
389
|
+
```
|
|
390
|
+
|
|
391
|
+
:::
|
|
392
|
+
|
|
393
|
+
- [查看详情](https://vuepress-theme-hope.github.io/v2/zh/guide/markdown/vue-playground.html)
|
|
393
394
|
|
|
394
395
|
#### 幻灯片
|
|
395
396
|
|
|
@@ -104,10 +104,45 @@ export default hopeTheme({
|
|
|
104
104
|
},
|
|
105
105
|
|
|
106
106
|
mdEnhance: {
|
|
107
|
-
|
|
107
|
+
align: true,
|
|
108
|
+
attrs: true,
|
|
109
|
+
chart: true,
|
|
110
|
+
codetabs: true,
|
|
111
|
+
container: true,
|
|
112
|
+
demo: true,
|
|
113
|
+
echarts: true,
|
|
114
|
+
flowchart: true,
|
|
115
|
+
gfm: true,
|
|
116
|
+
imageSize: true,
|
|
117
|
+
include: true,
|
|
118
|
+
lazyLoad: true,
|
|
119
|
+
mark: true,
|
|
120
|
+
mermaid: true,
|
|
121
|
+
playground: {
|
|
122
|
+
presets: ["ts", "vue"],
|
|
123
|
+
},
|
|
108
124
|
presentation: {
|
|
109
125
|
plugins: ["highlight", "math", "search", "notes", "zoom"],
|
|
110
126
|
},
|
|
127
|
+
stylize: [
|
|
128
|
+
{
|
|
129
|
+
matcher: "Recommanded",
|
|
130
|
+
replacer: ({ tag }) => {
|
|
131
|
+
if (tag === "em")
|
|
132
|
+
return {
|
|
133
|
+
tag: "Badge",
|
|
134
|
+
attrs: { type: "tip" },
|
|
135
|
+
content: "Recommanded",
|
|
136
|
+
};
|
|
137
|
+
},
|
|
138
|
+
},
|
|
139
|
+
],
|
|
140
|
+
sub: true,
|
|
141
|
+
sup: true,
|
|
142
|
+
tabs: true,
|
|
143
|
+
tex: true,
|
|
144
|
+
vpre: true,
|
|
145
|
+
vuePlayground: true,
|
|
111
146
|
},
|
|
112
147
|
},
|
|
113
148
|
});
|
|
@@ -42,48 +42,6 @@ VuePress 会使用 [markdown-it](https://github.com/markdown-it/markdown-it) 来
|
|
|
42
42
|
|
|
43
43
|
通过 [`vuepress-plugin-md-enhance`][md-enhance],主题扩展了更多 Markdown 语法,提供更加丰富的写作功能。
|
|
44
44
|
|
|
45
|
-
:::: tip 一键启用
|
|
46
|
-
|
|
47
|
-
你可以设置在主题选项中设置 `plugins.mdEnhance.enableAll: true` 启用 [md-enhance][md-enhance] 插件的所有功能。
|
|
48
|
-
|
|
49
|
-
::: code-tabs#language
|
|
50
|
-
|
|
51
|
-
@tab TS
|
|
52
|
-
|
|
53
|
-
```ts
|
|
54
|
-
import { hopeTheme } from "vuepress-theme-hope";
|
|
55
|
-
|
|
56
|
-
export default {
|
|
57
|
-
theme: hopeTheme({
|
|
58
|
-
plugins: {
|
|
59
|
-
mdEnhance: {
|
|
60
|
-
enableAll: true,
|
|
61
|
-
},
|
|
62
|
-
},
|
|
63
|
-
}),
|
|
64
|
-
};
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
@tab JS
|
|
68
|
-
|
|
69
|
-
```js
|
|
70
|
-
import { hopeTheme } from "vuepress-theme-hope";
|
|
71
|
-
|
|
72
|
-
export default {
|
|
73
|
-
theme: hopeTheme({
|
|
74
|
-
plugins: {
|
|
75
|
-
mdEnhance: {
|
|
76
|
-
enableAll: true,
|
|
77
|
-
},
|
|
78
|
-
},
|
|
79
|
-
}),
|
|
80
|
-
};
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
:::
|
|
84
|
-
|
|
85
|
-
::::
|
|
86
|
-
|
|
87
45
|
#### 自定义容器
|
|
88
46
|
|
|
89
47
|
::: v-pre
|
|
@@ -196,6 +154,12 @@ npm i -D vuepress-theme-hope
|
|
|
196
154
|
|
|
197
155
|
- [查看详情](https://vuepress-theme-hope.github.io/v2/zh/guide/markdown/code-tabs.html)
|
|
198
156
|
|
|
157
|
+
#### 上下角标
|
|
158
|
+
|
|
159
|
+
19^th^ H~2~O
|
|
160
|
+
|
|
161
|
+
- [查看详情](https://vuepress-theme-hope.github.io/v2/zh/guide/markdown/sup-sub.html)
|
|
162
|
+
|
|
199
163
|
#### 自定义对齐
|
|
200
164
|
|
|
201
165
|
::: center
|
|
@@ -212,11 +176,11 @@ npm i -D vuepress-theme-hope
|
|
|
212
176
|
|
|
213
177
|
- [查看详情](https://vuepress-theme-hope.github.io/v2/zh/guide/markdown/align.html)
|
|
214
178
|
|
|
215
|
-
####
|
|
179
|
+
#### Attrs
|
|
216
180
|
|
|
217
|
-
|
|
181
|
+
一个拥有 ID 的 **单次**{#word}。
|
|
218
182
|
|
|
219
|
-
- [查看详情](https://vuepress-theme-hope.github.io/v2/zh/guide/markdown/
|
|
183
|
+
- [查看详情](https://vuepress-theme-hope.github.io/v2/zh/guide/markdown/attrs.html)
|
|
220
184
|
|
|
221
185
|
#### 脚注
|
|
222
186
|
|
|
@@ -383,13 +347,50 @@ span {
|
|
|
383
347
|
|
|
384
348
|
#### 样式化
|
|
385
349
|
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
设置它<span style="color:red">没有</span>任何效果,请<span style="color:red">不要</span>这样使用
|
|
350
|
+
向 Mr.Hope 捐赠一杯咖啡。 _Recommanded_
|
|
389
351
|
|
|
390
352
|
- [查看详情](https://vuepress-theme-hope.github.io/v2/zh/guide/markdown/stylize.html)
|
|
391
353
|
|
|
392
|
-
|
|
354
|
+
#### 交互演示
|
|
355
|
+
|
|
356
|
+
::: playground#ts TS 案例
|
|
357
|
+
|
|
358
|
+
@file index.ts
|
|
359
|
+
|
|
360
|
+
```ts
|
|
361
|
+
const msg = "hello world";
|
|
362
|
+
|
|
363
|
+
const speak = (msg: string) => console.log(msg);
|
|
364
|
+
|
|
365
|
+
speak(msg);
|
|
366
|
+
```
|
|
367
|
+
|
|
368
|
+
:::
|
|
369
|
+
|
|
370
|
+
- [查看详情](https://vuepress-theme-hope.github.io/v2/zh/guide/markdown/playground.html)
|
|
371
|
+
|
|
372
|
+
#### Vue 交互演示
|
|
373
|
+
|
|
374
|
+
::: vue-playground Vue 交互演示
|
|
375
|
+
|
|
376
|
+
@file App.vue
|
|
377
|
+
|
|
378
|
+
```vue
|
|
379
|
+
<script setup>
|
|
380
|
+
import { ref } from "vue";
|
|
381
|
+
|
|
382
|
+
const msg = ref("Hello World!");
|
|
383
|
+
</script>
|
|
384
|
+
|
|
385
|
+
<template>
|
|
386
|
+
<h1>{{ msg }}</h1>
|
|
387
|
+
<input v-model="msg" />
|
|
388
|
+
</template>
|
|
389
|
+
```
|
|
390
|
+
|
|
391
|
+
:::
|
|
392
|
+
|
|
393
|
+
- [查看详情](https://vuepress-theme-hope.github.io/v2/zh/guide/markdown/vue-playground.html)
|
|
393
394
|
|
|
394
395
|
#### 幻灯片
|
|
395
396
|
|