create-vuepress-theme-hope 2.0.0-beta.78 → 2.0.0-beta.80
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/lib/index.js +1 -1
- package/package.json +1 -1
- package/template/en-US/.vuepress/theme.ts +6 -6
- package/template/en-US/README.md +1 -1
- package/template/en-US/guide/README.md +4 -3
- package/template/en-US/guide/disable.md +4 -4
- package/template/en-US/guide/markdown.md +128 -26
- package/template/en-US/guide/page.md +23 -17
- package/template/en-US/home.md +1 -1
- package/template/i18n/.vuepress/theme.ts +6 -6
- package/template/i18n/README.md +1 -1
- package/template/i18n/guide/README.md +4 -3
- package/template/i18n/guide/disable.md +4 -4
- package/template/i18n/guide/markdown.md +130 -26
- package/template/i18n/guide/page.md +23 -17
- package/template/i18n/home.md +1 -1
- package/template/i18n/zh/README.md +1 -1
- package/template/i18n/zh/guide/README.md +4 -3
- package/template/i18n/zh/guide/disable.md +4 -4
- package/template/i18n/zh/guide/markdown.md +110 -24
- package/template/i18n/zh/guide/page.md +20 -14
- package/template/i18n/zh/home.md +1 -1
- package/template/zh-CN/.vuepress/theme.ts +6 -6
- package/template/zh-CN/README.md +1 -1
- package/template/zh-CN/guide/README.md +4 -3
- package/template/zh-CN/guide/disable.md +4 -4
- package/template/zh-CN/guide/markdown.md +110 -24
- package/template/zh-CN/guide/page.md +20 -14
- package/template/zh-CN/home.md +3 -3
|
@@ -1,40 +1,70 @@
|
|
|
1
1
|
---
|
|
2
|
-
order: 2
|
|
3
|
-
icon: markdown
|
|
4
2
|
title: Markdown Enhance
|
|
3
|
+
icon: markdown
|
|
4
|
+
order: 2
|
|
5
5
|
category:
|
|
6
6
|
- Guide
|
|
7
7
|
tag:
|
|
8
8
|
- Markdown
|
|
9
9
|
---
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
VuePress basically generate pages from Markdown files. So you can use it to generate documentation or blog sites easily.
|
|
12
12
|
|
|
13
|
-
You
|
|
13
|
+
You should create and write Markdown files, so that VuePress can convert them to different pages according to file structure.
|
|
14
14
|
|
|
15
15
|
<!-- more -->
|
|
16
16
|
|
|
17
17
|
## Markdown Introduction
|
|
18
18
|
|
|
19
|
-
If you are a new learner and don’t know how to write Markdown, please read [Markdown Intro](https://vuepress-theme-hope.github.io/v2/
|
|
19
|
+
If you are a new learner and don’t know how to write Markdown, please read [Markdown Intro](https://vuepress-theme-hope.github.io/v2/cookbook/markdown/) and [Markdown Demo](https://vuepress-theme-hope.github.io/v2/cookbook/markdown/demo.html).
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
## Markdown Config
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
VuePress introduce configuration for each markdown page using Frontmatter.
|
|
24
|
+
|
|
25
|
+
::: info
|
|
26
|
+
|
|
27
|
+
Frontmatter is a important concept in VuePress. If you don’t know it, you need to read [Frontmatter Introduction](https://vuepress-theme-hope.github.io/v2/cookbook/vuepress/page.html#front-matter).
|
|
24
28
|
|
|
25
29
|
:::
|
|
26
30
|
|
|
27
|
-
##
|
|
31
|
+
## Markdown Extension
|
|
32
|
+
|
|
33
|
+
The Markdown content in VuePress will be parsed by [markdown-it](https://github.com/markdown-it/markdown-it), which supports [syntax extensions](https://github.com/markdown-it/markdown-it#syntax-extensions) via markdown-it plugins.
|
|
34
|
+
|
|
35
|
+
### VuePress Enhancement
|
|
28
36
|
|
|
29
37
|
To enrich document writing, VuePress has extended Markdown syntax.
|
|
30
38
|
|
|
31
39
|
For these extensions, please read [Markdown extensions in VuePress](https://vuepress-theme-hope.github.io/v2/basic/vuepress/markdown.html).
|
|
32
40
|
|
|
33
|
-
|
|
41
|
+
### Theme Enhancement
|
|
34
42
|
|
|
35
|
-
|
|
43
|
+
By using [`vuepress-plugin-md-enhance`][md-enhance], the theme extends more Markdown syntax and provides richer writing functions.
|
|
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
|
+
```
|
|
36
66
|
|
|
37
|
-
|
|
67
|
+
@tab JS
|
|
38
68
|
|
|
39
69
|
```js
|
|
40
70
|
const { hopeTheme } = require("vuepress-theme-hope");
|
|
@@ -50,9 +80,11 @@ module.exports = {
|
|
|
50
80
|
};
|
|
51
81
|
```
|
|
52
82
|
|
|
53
|
-
|
|
83
|
+
:::
|
|
84
|
+
|
|
85
|
+
::::
|
|
54
86
|
|
|
55
|
-
|
|
87
|
+
#### Custom Container
|
|
56
88
|
|
|
57
89
|
::: v-pre
|
|
58
90
|
|
|
@@ -136,7 +168,29 @@ A custom details container
|
|
|
136
168
|
|
|
137
169
|
::::
|
|
138
170
|
|
|
139
|
-
|
|
171
|
+
- [View Detail](https://vuepress-theme-hope.github.io/v2/guide/markdown/container.html)
|
|
172
|
+
|
|
173
|
+
### Tabs
|
|
174
|
+
|
|
175
|
+
::: tabs#fruit
|
|
176
|
+
|
|
177
|
+
@tab apple
|
|
178
|
+
|
|
179
|
+
Apple
|
|
180
|
+
|
|
181
|
+
@tab banana
|
|
182
|
+
|
|
183
|
+
Banana
|
|
184
|
+
|
|
185
|
+
@tab orange
|
|
186
|
+
|
|
187
|
+
Orange
|
|
188
|
+
|
|
189
|
+
:::
|
|
190
|
+
|
|
191
|
+
- [View Detail](https://vuepress-theme-hope.github.io/v2/guide/markdown/tabs.html)
|
|
192
|
+
|
|
193
|
+
#### Code Tabs
|
|
140
194
|
|
|
141
195
|
::: code-tabs
|
|
142
196
|
|
|
@@ -162,13 +216,13 @@ npm i -D vuepress-theme-hope
|
|
|
162
216
|
|
|
163
217
|
- [View Detail](https://vuepress-theme-hope.github.io/v2/guide/markdown/code-tabs.html)
|
|
164
218
|
|
|
165
|
-
|
|
219
|
+
#### Superscript and Subscript
|
|
166
220
|
|
|
167
221
|
19^th^ H~2~O
|
|
168
222
|
|
|
169
223
|
- [View Detail](https://vuepress-theme-hope.github.io/v2/guide/markdown/sup-sub.html)
|
|
170
224
|
|
|
171
|
-
|
|
225
|
+
#### Align
|
|
172
226
|
|
|
173
227
|
::: center
|
|
174
228
|
|
|
@@ -184,7 +238,7 @@ I am right align
|
|
|
184
238
|
|
|
185
239
|
- [View Detail](https://vuepress-theme-hope.github.io/v2/guide/markdown/align.html)
|
|
186
240
|
|
|
187
|
-
|
|
241
|
+
#### Footnote
|
|
188
242
|
|
|
189
243
|
This text has footnote[^first].
|
|
190
244
|
|
|
@@ -192,20 +246,26 @@ This text has footnote[^first].
|
|
|
192
246
|
|
|
193
247
|
- [View Detail](https://vuepress-theme-hope.github.io/v2/guide/markdown/footnote.html)
|
|
194
248
|
|
|
195
|
-
|
|
249
|
+
#### Mark
|
|
196
250
|
|
|
197
251
|
You can mark ==important words== .
|
|
198
252
|
|
|
199
253
|
- [View Detail](https://vuepress-theme-hope.github.io/v2/guide/markdown/mark.html)
|
|
200
254
|
|
|
201
|
-
|
|
255
|
+
#### Tasklist
|
|
202
256
|
|
|
203
257
|
- [x] Plan A
|
|
204
258
|
- [ ] Plan B
|
|
205
259
|
|
|
206
260
|
- [View Detail](https://vuepress-theme-hope.github.io/v2/guide/markdown/tasklist.html)
|
|
207
261
|
|
|
208
|
-
|
|
262
|
+
#### Image Enhancement
|
|
263
|
+
|
|
264
|
+
Support setting color scheme and size
|
|
265
|
+
|
|
266
|
+
- [View Detail](https://vuepress-theme-hope.github.io/v2/guide/markdown/image.md)
|
|
267
|
+
|
|
268
|
+
#### Chart
|
|
209
269
|
|
|
210
270
|
::: chart A Scatter Chart
|
|
211
271
|
|
|
@@ -239,9 +299,35 @@ You can mark ==important words== .
|
|
|
239
299
|
|
|
240
300
|
:::
|
|
241
301
|
|
|
242
|
-
- [View Detail](
|
|
302
|
+
- [View Detail](https://vuepress-theme-hope.github.io/v2/guide/markdown/chart.html)
|
|
303
|
+
|
|
304
|
+
#### Echarts
|
|
243
305
|
|
|
244
|
-
|
|
306
|
+
::: echarts A line chart
|
|
307
|
+
|
|
308
|
+
```json
|
|
309
|
+
{
|
|
310
|
+
"xAxis": {
|
|
311
|
+
"type": "category",
|
|
312
|
+
"data": ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"]
|
|
313
|
+
},
|
|
314
|
+
"yAxis": {
|
|
315
|
+
"type": "value"
|
|
316
|
+
},
|
|
317
|
+
"series": [
|
|
318
|
+
{
|
|
319
|
+
"data": [150, 230, 224, 218, 135, 147, 260],
|
|
320
|
+
"type": "line"
|
|
321
|
+
}
|
|
322
|
+
]
|
|
323
|
+
}
|
|
324
|
+
```
|
|
325
|
+
|
|
326
|
+
:::
|
|
327
|
+
|
|
328
|
+
- [View Detail](https://vuepress-theme-hope.github.io/v2/guide/markdown/echarts.html)
|
|
329
|
+
|
|
330
|
+
#### Flowchart
|
|
245
331
|
|
|
246
332
|
```flow
|
|
247
333
|
cond=>condition: Process?
|
|
@@ -254,7 +340,7 @@ cond(no)->e
|
|
|
254
340
|
|
|
255
341
|
- [View Detail](https://vuepress-theme-hope.github.io/v2/guide/markdown/flowchart.html)
|
|
256
342
|
|
|
257
|
-
|
|
343
|
+
#### Mermaid
|
|
258
344
|
|
|
259
345
|
```mermaid
|
|
260
346
|
flowchart TB
|
|
@@ -275,7 +361,7 @@ flowchart TB
|
|
|
275
361
|
|
|
276
362
|
- [View Detail](https://vuepress-theme-hope.github.io/v2/guide/markdown/mermaid.html)
|
|
277
363
|
|
|
278
|
-
|
|
364
|
+
#### Tex
|
|
279
365
|
|
|
280
366
|
$$
|
|
281
367
|
\frac {\partial^r} {\partial \omega^r} \left(\frac {y^{\omega}} {\omega}\right)
|
|
@@ -284,7 +370,13 @@ $$
|
|
|
284
370
|
|
|
285
371
|
- [View Detail](https://vuepress-theme-hope.github.io/v2/guide/markdown/tex.html)
|
|
286
372
|
|
|
287
|
-
###
|
|
373
|
+
### Include files
|
|
374
|
+
|
|
375
|
+
@include(./README.md{11-17})
|
|
376
|
+
|
|
377
|
+
- [View Detail](https://vuepress-theme-hope.github.io/v2/guide/markdown/include.md)
|
|
378
|
+
|
|
379
|
+
#### Code Demo
|
|
288
380
|
|
|
289
381
|
::: normal-demo A normal demo
|
|
290
382
|
|
|
@@ -309,7 +401,17 @@ span {
|
|
|
309
401
|
|
|
310
402
|
- [View Detail](https://vuepress-theme-hope.github.io/v2/guide/markdown/demo.html)
|
|
311
403
|
|
|
312
|
-
|
|
404
|
+
#### Stylize
|
|
405
|
+
|
|
406
|
+
<!-- markdownlint-disable MD033 -->
|
|
407
|
+
|
|
408
|
+
Setting this to a invalid stytax <span style="color:red">doesn't</span> have any effect.
|
|
409
|
+
|
|
410
|
+
- [View Detail](https://vuepress-theme-hope.github.io/v2/guide/markdown/stylize.md)
|
|
411
|
+
|
|
412
|
+
<!-- markdownlint-enable MD033 -->
|
|
413
|
+
|
|
414
|
+
#### Presentation
|
|
313
415
|
|
|
314
416
|
@slidestart
|
|
315
417
|
|
|
@@ -343,3 +445,5 @@ $$
|
|
|
343
445
|
@slideend
|
|
344
446
|
|
|
345
447
|
- [View Detail](https://vuepress-theme-hope.github.io/v2/guide/markdown/presentation.html)
|
|
448
|
+
|
|
449
|
+
[md-enhance]: https://vuepress-theme-hope.github.io/v2/md-enhance/
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
---
|
|
2
|
-
# This control sidebar index
|
|
3
|
-
order: 1
|
|
4
|
-
# This is the icon of the page
|
|
5
|
-
icon: page
|
|
6
2
|
# This is the title of the article
|
|
7
3
|
title: page config
|
|
4
|
+
# This is the icon of the page
|
|
5
|
+
icon: page
|
|
6
|
+
# This control sidebar order
|
|
7
|
+
order: 1
|
|
8
8
|
# Set author
|
|
9
9
|
author: Ms.Hope
|
|
10
10
|
# Set writing time
|
|
@@ -18,10 +18,12 @@ tag:
|
|
|
18
18
|
- Guide
|
|
19
19
|
# this page is sticky in article list
|
|
20
20
|
sticky: true
|
|
21
|
-
# this page will appear in
|
|
21
|
+
# this page will appear in starred articles
|
|
22
22
|
star: true
|
|
23
|
-
# You can customize
|
|
23
|
+
# You can customize footer content
|
|
24
24
|
footer: Footer content for test
|
|
25
|
+
# You can customize copyright content
|
|
26
|
+
copyright: No Copyright
|
|
25
27
|
---
|
|
26
28
|
|
|
27
29
|
Content before `more` comment is regarded as page excerpt.
|
|
@@ -32,23 +34,20 @@ Content before `more` comment is regarded as page excerpt.
|
|
|
32
34
|
|
|
33
35
|
You can set page information in Markdown’s Frontmatter.
|
|
34
36
|
|
|
35
|
-
- The author is
|
|
36
|
-
|
|
37
|
-
- The writing time should be January 1, 2020
|
|
38
|
-
|
|
37
|
+
- The author is Ms.Hope.
|
|
38
|
+
- The writing date is January 1, 2020
|
|
39
39
|
- Category is "Guide"
|
|
40
|
-
|
|
41
40
|
- Tags are "Page Config" and "Guide"
|
|
42
41
|
|
|
43
42
|
## Page Content
|
|
44
43
|
|
|
45
44
|
You are free to write your Markdown here.
|
|
46
45
|
|
|
47
|
-
::: tip
|
|
46
|
+
::: tip Assets
|
|
48
47
|
|
|
49
|
-
-
|
|
48
|
+
- You can place images besides your markdown files, but you should use **relative links** (i.e.: starting with `./`) for them.
|
|
50
49
|
|
|
51
|
-
- For
|
|
50
|
+
- For images in `.vuepress/public` directory, please use absolute links (i.e.: startingwith `/`) for them.
|
|
52
51
|
|
|
53
52
|
:::
|
|
54
53
|
|
|
@@ -60,7 +59,14 @@ The theme contains a custom badge:
|
|
|
60
59
|
|
|
61
60
|
This page should contain:
|
|
62
61
|
|
|
62
|
+
- [BreadCrumb](https://vuepress-theme-hope.github.io/v2/guide/layout/breadcrumb.html)
|
|
63
|
+
- [Title and infomation](https://vuepress-theme-hope.github.io/v2/guide/feature/page-info.html)
|
|
64
|
+
- [TOC (Table of Contents)](https://vuepress-theme-hope.github.io/v2/guide/layout/page.html#header-list)
|
|
65
|
+
- [Meta infomation including update time and contributors](https://vuepress-theme-hope.github.io/v2/guide/feature/meta.html)
|
|
66
|
+
- [Comments](https://vuepress-theme-hope.github.io/v2/guide/feature/comment.html)
|
|
67
|
+
- [Navbar](https://vuepress-theme-hope.github.io/v2/guide/layout/navbar.html)
|
|
68
|
+
- [Sidebar](https://vuepress-theme-hope.github.io/v2/guide/layout/sidebar.html)
|
|
69
|
+
- [Footer](https://vuepress-theme-hope.github.io/v2/guide/layout/footer.html)
|
|
63
70
|
- Back to top button
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
- Footer
|
|
71
|
+
|
|
72
|
+
You can customize them in theme options and page frontmatter.
|
package/template/i18n/home.md
CHANGED
|
@@ -103,7 +103,7 @@ copyright: false
|
|
|
103
103
|
footer: MIT Licensed | Copyright © 2019-present Mr.Hope
|
|
104
104
|
---
|
|
105
105
|
|
|
106
|
-
This is an example of a
|
|
106
|
+
This is an example of a project homepage. You can place your main content here.
|
|
107
107
|
|
|
108
108
|
To use this layout, you need to set `home: true` in the page front matter.
|
|
109
109
|
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
---
|
|
2
|
+
title: 主要功能与配置演示
|
|
2
3
|
index: false
|
|
3
4
|
icon: creative
|
|
4
5
|
category:
|
|
5
6
|
- 使用指南
|
|
6
7
|
---
|
|
7
8
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
- [页面展示](page.md)
|
|
9
|
+
## 目录
|
|
11
10
|
|
|
12
11
|
- [Markdown 展示](markdown.md)
|
|
13
12
|
|
|
13
|
+
- [页面展示](page.md)
|
|
14
|
+
|
|
14
15
|
- [禁用展示](disable.md)
|
|
15
16
|
|
|
16
17
|
- [加密展示](encrypt.md)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
title: 组件禁用
|
|
2
|
+
title: 布局与功能禁用
|
|
4
3
|
icon: config
|
|
4
|
+
order: 3
|
|
5
5
|
category:
|
|
6
6
|
- 使用指南
|
|
7
7
|
tag:
|
|
@@ -23,11 +23,11 @@ footer: false
|
|
|
23
23
|
backtotop: false
|
|
24
24
|
---
|
|
25
25
|
|
|
26
|
-
你可以通过设置页面的 Frontmatter
|
|
26
|
+
你可以通过设置页面的 Frontmatter,在页面禁用功能与布局。
|
|
27
27
|
|
|
28
28
|
<!-- more -->
|
|
29
29
|
|
|
30
|
-
|
|
30
|
+
本页面就是一个示例,禁用了如下功能:
|
|
31
31
|
|
|
32
32
|
- 导航栏
|
|
33
33
|
- 侧边栏
|
|
@@ -1,38 +1,70 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
2
|
+
title: Markdown 展示
|
|
3
3
|
icon: markdown
|
|
4
|
-
|
|
4
|
+
order: 2
|
|
5
5
|
category:
|
|
6
6
|
- 使用指南
|
|
7
7
|
tag:
|
|
8
8
|
- Markdown
|
|
9
9
|
---
|
|
10
10
|
|
|
11
|
-
VuePress
|
|
11
|
+
VuePress 主要从 Markdown 文件生成页面。因此,你可以使用它轻松生成文档或博客站点。
|
|
12
|
+
|
|
13
|
+
你应该创建和编写 Markdown 文件,以便 VuePress 可以根据文件结构将它们转换为不同的页面。
|
|
12
14
|
|
|
13
15
|
<!-- more -->
|
|
14
16
|
|
|
15
17
|
## Markdown 介绍
|
|
16
18
|
|
|
17
|
-
如果你是一个新手,还不会编写 Markdown,请先阅读 [Markdown 介绍](https://vuepress-theme-hope.github.io/v2/zh/
|
|
19
|
+
如果你是一个新手,还不会编写 Markdown,请先阅读 [Markdown 介绍](https://vuepress-theme-hope.github.io/v2/zh/cookbook/markdown/) 和 [Markdown 演示](https://vuepress-theme-hope.github.io/v2/zh/cookbook/markdown/demo.html)。
|
|
20
|
+
|
|
21
|
+
## Markdown 配置
|
|
18
22
|
|
|
19
|
-
|
|
23
|
+
VuePress 通过 Frontmatter 为每个 Markdown 页面引入配置。
|
|
20
24
|
|
|
21
|
-
|
|
25
|
+
::: info
|
|
26
|
+
|
|
27
|
+
Frontmatter 是 VuePress 中很重要的一个概念,如果你不了解它,你需要阅读 [Frontmatter 介绍](https://vuepress-theme-hope.github.io/v2/zh/cookbook/vuepress/page.html#front-matter)。
|
|
22
28
|
|
|
23
29
|
:::
|
|
24
30
|
|
|
25
|
-
##
|
|
31
|
+
## Markdown 扩展
|
|
32
|
+
|
|
33
|
+
VuePress 会使用 [markdown-it](https://github.com/markdown-it/markdown-it) 来解析 Markdown 内容,因此可以借助于 markdown-it 插件来实现 [语法扩展](https://github.com/markdown-it/markdown-it#syntax-extensions) 。
|
|
34
|
+
|
|
35
|
+
### VuePress 扩展
|
|
26
36
|
|
|
27
37
|
为了丰富文档写作,VuePress 对 Markdown 语法进行了扩展。
|
|
28
38
|
|
|
29
|
-
关于这些扩展,请阅读 [VuePress 中的 Markdown 扩展](https://vuepress-theme-hope.github.io/v2/zh/
|
|
39
|
+
关于这些扩展,请阅读 [VuePress 中的 Markdown 扩展](https://vuepress-theme-hope.github.io/v2/zh/cookbook/vuepress/markdown.html)。
|
|
40
|
+
|
|
41
|
+
### 主题扩展
|
|
42
|
+
|
|
43
|
+
通过 [`vuepress-plugin-md-enhance`][md-enhance],主题扩展了更多 Markdown 语法,提供更加丰富的写作功能。
|
|
44
|
+
|
|
45
|
+
:::: tip 一键启用
|
|
46
|
+
|
|
47
|
+
你可以设置在主题选项中设置 `plugins.mdEnhance.enableAll: true` 启用 [md-enhance][md-enhance] 插件的所有功能。
|
|
48
|
+
|
|
49
|
+
::: code-tabs#language
|
|
50
|
+
|
|
51
|
+
@tab TS
|
|
30
52
|
|
|
31
|
-
|
|
53
|
+
```ts
|
|
54
|
+
import { hopeTheme } from "vuepress-theme-hope";
|
|
32
55
|
|
|
33
|
-
|
|
56
|
+
export default {
|
|
57
|
+
theme: hopeTheme({
|
|
58
|
+
plugins: {
|
|
59
|
+
mdEnhance: {
|
|
60
|
+
enableAll: true,
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
}),
|
|
64
|
+
};
|
|
65
|
+
```
|
|
34
66
|
|
|
35
|
-
|
|
67
|
+
@tab JS
|
|
36
68
|
|
|
37
69
|
```js
|
|
38
70
|
const { hopeTheme } = require("vuepress-theme-hope");
|
|
@@ -48,7 +80,11 @@ module.exports = {
|
|
|
48
80
|
};
|
|
49
81
|
```
|
|
50
82
|
|
|
51
|
-
|
|
83
|
+
:::
|
|
84
|
+
|
|
85
|
+
::::
|
|
86
|
+
|
|
87
|
+
#### 自定义容器
|
|
52
88
|
|
|
53
89
|
::: v-pre
|
|
54
90
|
|
|
@@ -134,7 +170,7 @@ const a = 1;
|
|
|
134
170
|
|
|
135
171
|
- [查看详情](https://vuepress-theme-hope.github.io/v2/zh/guide/markdown/container.html)
|
|
136
172
|
|
|
137
|
-
|
|
173
|
+
#### 代码块
|
|
138
174
|
|
|
139
175
|
::: code-tabs
|
|
140
176
|
|
|
@@ -160,7 +196,7 @@ npm i -D vuepress-theme-hope
|
|
|
160
196
|
|
|
161
197
|
- [查看详情](https://vuepress-theme-hope.github.io/v2/zh/guide/markdown/code-tabs.html)
|
|
162
198
|
|
|
163
|
-
|
|
199
|
+
#### 自定义对齐
|
|
164
200
|
|
|
165
201
|
::: center
|
|
166
202
|
|
|
@@ -176,13 +212,13 @@ npm i -D vuepress-theme-hope
|
|
|
176
212
|
|
|
177
213
|
- [查看详情](https://vuepress-theme-hope.github.io/v2/zh/guide/markdown/align.html)
|
|
178
214
|
|
|
179
|
-
|
|
215
|
+
#### 上下角标
|
|
180
216
|
|
|
181
217
|
19^th^ H~2~O
|
|
182
218
|
|
|
183
219
|
- [查看详情](https://vuepress-theme-hope.github.io/v2/zh/guide/markdown/sup-sub.html)
|
|
184
220
|
|
|
185
|
-
|
|
221
|
+
#### 脚注
|
|
186
222
|
|
|
187
223
|
此文字有脚注[^first].
|
|
188
224
|
|
|
@@ -190,20 +226,26 @@ npm i -D vuepress-theme-hope
|
|
|
190
226
|
|
|
191
227
|
- [查看详情](https://vuepress-theme-hope.github.io/v2/zh/guide/markdown/footnote.html)
|
|
192
228
|
|
|
193
|
-
|
|
229
|
+
#### 标记
|
|
194
230
|
|
|
195
231
|
你可以标记 ==重要的内容== 。
|
|
196
232
|
|
|
197
233
|
- [查看详情](https://vuepress-theme-hope.github.io/v2/zh/guide/markdown/mark.html)
|
|
198
234
|
|
|
199
|
-
|
|
235
|
+
#### 任务列表
|
|
200
236
|
|
|
201
237
|
- [x] 计划 1
|
|
202
238
|
- [ ] 计划 2
|
|
203
239
|
|
|
204
240
|
- [查看详情](https://vuepress-theme-hope.github.io/v2/zh/guide/markdown/tasklist.html)
|
|
205
241
|
|
|
206
|
-
###
|
|
242
|
+
### 图片增强
|
|
243
|
+
|
|
244
|
+
支持为图片设置颜色模式和大小
|
|
245
|
+
|
|
246
|
+
- [查看详情](https://vuepress-theme-hope.github.io/v2/zh/guide/markdown/image.html)
|
|
247
|
+
|
|
248
|
+
#### 图表
|
|
207
249
|
|
|
208
250
|
::: chart 一个散点图案例
|
|
209
251
|
|
|
@@ -239,7 +281,33 @@ npm i -D vuepress-theme-hope
|
|
|
239
281
|
|
|
240
282
|
- [查看详情](https://vuepress-theme-hope.github.io/v2/zh/guide/markdown/chart.html)
|
|
241
283
|
|
|
242
|
-
|
|
284
|
+
#### Echarts
|
|
285
|
+
|
|
286
|
+
::: echarts 一个折线图案例
|
|
287
|
+
|
|
288
|
+
```json
|
|
289
|
+
{
|
|
290
|
+
"xAxis": {
|
|
291
|
+
"type": "category",
|
|
292
|
+
"data": ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"]
|
|
293
|
+
},
|
|
294
|
+
"yAxis": {
|
|
295
|
+
"type": "value"
|
|
296
|
+
},
|
|
297
|
+
"series": [
|
|
298
|
+
{
|
|
299
|
+
"data": [150, 230, 224, 218, 135, 147, 260],
|
|
300
|
+
"type": "line"
|
|
301
|
+
}
|
|
302
|
+
]
|
|
303
|
+
}
|
|
304
|
+
```
|
|
305
|
+
|
|
306
|
+
:::
|
|
307
|
+
|
|
308
|
+
- [查看详情](https://vuepress-theme-hope.github.io/v2/zh/guide/markdown/echarts.html)
|
|
309
|
+
|
|
310
|
+
#### 流程图
|
|
243
311
|
|
|
244
312
|
```flow
|
|
245
313
|
cond=>condition: 是否执行操作?
|
|
@@ -252,7 +320,7 @@ cond(no)->e
|
|
|
252
320
|
|
|
253
321
|
- [查看详情](https://vuepress-theme-hope.github.io/v2/zh/guide/markdown/flowchart.html)
|
|
254
322
|
|
|
255
|
-
|
|
323
|
+
#### Mermaid
|
|
256
324
|
|
|
257
325
|
```mermaid
|
|
258
326
|
flowchart TB
|
|
@@ -273,7 +341,7 @@ flowchart TB
|
|
|
273
341
|
|
|
274
342
|
- [查看详情](https://vuepress-theme-hope.github.io/v2/zh/guide/markdown/mermaid.html)
|
|
275
343
|
|
|
276
|
-
|
|
344
|
+
#### Tex 语法
|
|
277
345
|
|
|
278
346
|
$$
|
|
279
347
|
\frac {\partial^r} {\partial \omega^r} \left(\frac {y^{\omega}} {\omega}\right)
|
|
@@ -282,7 +350,13 @@ $$
|
|
|
282
350
|
|
|
283
351
|
- [查看详情](https://vuepress-theme-hope.github.io/v2/zh/guide/markdown/tex.html)
|
|
284
352
|
|
|
285
|
-
|
|
353
|
+
#### 导入文件
|
|
354
|
+
|
|
355
|
+
@include(./README.md{11-17})
|
|
356
|
+
|
|
357
|
+
- [查看详情](https://vuepress-theme-hope.github.io/v2/zh/guide/markdown/include.html)
|
|
358
|
+
|
|
359
|
+
#### 代码演示
|
|
286
360
|
|
|
287
361
|
::: normal-demo 一个普通 Demo
|
|
288
362
|
|
|
@@ -307,7 +381,17 @@ span {
|
|
|
307
381
|
|
|
308
382
|
- [查看详情](https://vuepress-theme-hope.github.io/v2/zh/guide/markdown/demo.html)
|
|
309
383
|
|
|
310
|
-
|
|
384
|
+
#### 样式化
|
|
385
|
+
|
|
386
|
+
<!-- markdownlint-disable MD033 -->
|
|
387
|
+
|
|
388
|
+
设置它<span style="color:red">没有</span>任何效果,请<span style="color:red">不要</span>这样使用
|
|
389
|
+
|
|
390
|
+
- [查看详情](https://vuepress-theme-hope.github.io/v2/zh/guide/markdown/stylize.html)
|
|
391
|
+
|
|
392
|
+
<!-- markdownlint-enable MD033 -->
|
|
393
|
+
|
|
394
|
+
#### 幻灯片
|
|
311
395
|
|
|
312
396
|
@slidestart
|
|
313
397
|
|
|
@@ -341,3 +425,5 @@ $$
|
|
|
341
425
|
@slideend
|
|
342
426
|
|
|
343
427
|
- [查看详情](https://vuepress-theme-hope.github.io/v2/zh/guide/markdown/presentation.html)
|
|
428
|
+
|
|
429
|
+
[md-enhance]: https://vuepress-theme-hope.github.io/v2/md-enhance/zh/
|