create-vuepress-theme-hope 2.0.0-beta.21 → 2.0.0-beta.211
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/LICENSE +1 -1
- package/README.md +35 -0
- package/lib/index.js +65 -0
- package/package.json +25 -14
- package/template/blog/.vuepress/config.ts +24 -0
- package/template/blog/.vuepress/navbar/en.ts +52 -0
- package/template/blog/.vuepress/navbar/index.ts +2 -0
- package/template/blog/.vuepress/navbar/zh.ts +52 -0
- package/template/blog/.vuepress/public/assets/images/cover1.jpg +0 -0
- package/template/blog/.vuepress/public/assets/images/cover2.jpg +0 -0
- package/template/blog/.vuepress/public/assets/images/cover3.jpg +0 -0
- package/template/blog/.vuepress/sidebar/en.ts +22 -0
- package/template/blog/.vuepress/sidebar/index.ts +2 -0
- package/template/blog/.vuepress/sidebar/zh.ts +22 -0
- package/template/blog/.vuepress/styles/config.scss +3 -0
- package/template/blog/.vuepress/styles/index.scss +1 -0
- package/template/blog/.vuepress/styles/palette.scss +2 -0
- package/template/blog/.vuepress/theme.ts +224 -0
- package/template/{i18n → blog}/README.md +5 -5
- package/template/{i18n/guide → blog/demo}/README.md +5 -4
- package/template/{i18n/guide → blog/demo}/disable.md +4 -4
- package/template/{i18n/guide → blog/demo}/encrypt.md +1 -1
- package/template/blog/demo/markdown.md +423 -0
- package/template/blog/demo/page.md +74 -0
- package/template/blog/intro.md +8 -0
- package/template/{i18n/posts/article/article1.md → blog/posts/apple/1.md} +5 -4
- package/template/{en-US/posts/article/article2.md → blog/posts/apple/2.md} +9 -4
- package/template/{i18n/posts/article/article3.md → blog/posts/apple/3.md} +6 -5
- package/template/{i18n/posts/article/article4.md → blog/posts/apple/4.md} +6 -5
- package/template/{en-US/posts/article/article5.md → blog/posts/banana/1.md} +6 -5
- package/template/{en-US/posts/article/article6.md → blog/posts/banana/2.md} +10 -5
- package/template/{i18n/posts/article/article7.md → blog/posts/banana/3.md} +5 -5
- package/template/{i18n/posts/article/article8.md → blog/posts/banana/4.md} +5 -5
- package/template/{i18n/posts/article9.md → blog/posts/cherry.md} +5 -5
- package/template/{i18n/posts/article10.md → blog/posts/dragonfruit.md} +5 -5
- package/template/{i18n/posts/article11.md → blog/posts/strawberry.md} +5 -5
- package/template/{en-US/posts/article12.md → blog/posts/tomato.md} +6 -5
- package/template/{i18n/slide.md → blog/slides.md} +8 -8
- package/template/{i18n → blog}/zh/README.md +4 -4
- package/template/{i18n/zh/guide → blog/zh/demo}/README.md +5 -4
- package/template/{i18n/zh/guide → blog/zh/demo}/disable.md +4 -4
- package/template/blog/zh/demo/markdown.md +403 -0
- package/template/blog/zh/demo/page.md +74 -0
- package/template/blog/zh/intro.md +8 -0
- package/template/{i18n/zh/posts/article/article1.md → blog/zh/posts/apple/1.md} +5 -4
- package/template/{zh-CN/posts/article/article2.md → blog/zh/posts/apple/2.md} +9 -4
- package/template/{i18n/zh/posts/article/article3.md → blog/zh/posts/apple/3.md} +6 -5
- package/template/{zh-CN/posts/article/article4.md → blog/zh/posts/apple/4.md} +6 -5
- package/template/{i18n/zh/posts/article/article5.md → blog/zh/posts/banana/1.md} +6 -5
- package/template/{i18n/zh/posts/article/article6.md → blog/zh/posts/banana/2.md} +10 -5
- package/template/{i18n/zh/posts/article/article7.md → blog/zh/posts/banana/3.md} +5 -5
- package/template/{i18n/zh/posts/article/article8.md → blog/zh/posts/banana/4.md} +5 -5
- package/template/{i18n/zh/posts/article9.md → blog/zh/posts/cherry.md} +5 -5
- package/template/{i18n/zh/posts/article10.md → blog/zh/posts/dragonfruit.md} +5 -5
- package/template/{i18n/zh/posts/article11.md → blog/zh/posts/strawberry.md} +5 -5
- package/template/{i18n/zh/posts/article12.md → blog/zh/posts/tomato.md} +6 -5
- package/template/{i18n/zh/slide.md → blog/zh/slides.md} +1 -1
- package/template/docs/.vuepress/config.ts +24 -0
- package/template/docs/.vuepress/navbar/en.ts +30 -0
- package/template/docs/.vuepress/navbar/index.ts +2 -0
- package/template/docs/.vuepress/navbar/zh.ts +30 -0
- package/template/docs/.vuepress/sidebar/en.ts +21 -0
- package/template/docs/.vuepress/sidebar/index.ts +2 -0
- package/template/docs/.vuepress/sidebar/zh.ts +21 -0
- package/template/docs/.vuepress/styles/config.scss +3 -0
- package/template/docs/.vuepress/styles/index.scss +1 -0
- package/template/docs/.vuepress/styles/palette.scss +2 -0
- package/template/docs/.vuepress/theme.ts +172 -0
- package/template/{en-US/home.md → docs/README.md} +28 -28
- package/template/{en-US/guide → docs/demo}/README.md +5 -4
- package/template/{en-US/guide → docs/demo}/disable.md +4 -4
- package/template/{en-US/guide → docs/demo}/encrypt.md +1 -1
- package/template/docs/demo/markdown.md +423 -0
- package/template/docs/demo/page.md +72 -0
- package/template/docs/guide/README.md +16 -0
- package/template/docs/guide/bar/README.md +13 -0
- package/template/docs/guide/bar/baz.md +6 -0
- package/template/docs/guide/foo/README.md +13 -0
- package/template/docs/guide/foo/ray.md +6 -0
- package/template/{en-US/slide.md → docs/slides.md} +8 -8
- package/template/{i18n/zh/home.md → docs/zh/README.md} +24 -24
- package/template/{zh-CN/guide → docs/zh/demo}/README.md +5 -4
- package/template/{zh-CN/guide → docs/zh/demo}/disable.md +4 -4
- package/template/docs/zh/demo/markdown.md +403 -0
- package/template/docs/zh/demo/page.md +72 -0
- package/template/docs/zh/guide/README.md +16 -0
- package/template/docs/zh/guide/bar/README.md +13 -0
- package/template/docs/zh/guide/bar/baz.md +6 -0
- package/template/docs/zh/guide/foo/README.md +13 -0
- package/template/docs/zh/guide/foo/ray.md +6 -0
- package/template/{zh-CN/slide.md → docs/zh/slides.md} +1 -1
- package/template/public/assets/icon/apple-icon-152.png +0 -0
- package/template/public/assets/icon/chrome-192.png +0 -0
- package/template/public/assets/icon/chrome-512.png +0 -0
- package/template/public/assets/icon/chrome-mask-192.png +0 -0
- package/template/public/assets/icon/chrome-mask-512.png +0 -0
- package/template/public/assets/icon/guide-maskable.png +0 -0
- package/template/public/assets/icon/ms-icon-144.png +0 -0
- package/CHANGELOG.md +0 -184
- package/lib/node/index.d.ts +0 -1
- package/lib/node/index.js +0 -3
- package/lib/node/index.js.map +0 -1
- package/readme.md +0 -33
- package/rollup.config.js +0 -14
- package/src/node/checkVersion.ts +0 -31
- package/src/node/copy.ts +0 -45
- package/src/node/deepAssign.ts +0 -42
- package/src/node/hasYarn.ts +0 -10
- package/src/node/i18n.ts +0 -91
- package/src/node/index.ts +0 -177
- package/src/node/registry.ts +0 -31
- package/template/en-US/.vuepress/config.ts +0 -28
- package/template/en-US/.vuepress/navbar.ts +0 -52
- package/template/en-US/.vuepress/sidebar.ts +0 -46
- package/template/en-US/.vuepress/styles/index.scss +0 -0
- package/template/en-US/.vuepress/styles/palette.scss +0 -0
- package/template/en-US/.vuepress/themeConfig.ts +0 -96
- package/template/en-US/README.md +0 -48
- package/template/en-US/guide/markdown.md +0 -341
- package/template/en-US/guide/page.md +0 -66
- package/template/en-US/intro.md +0 -7
- package/template/en-US/posts/article/article1.md +0 -19
- package/template/en-US/posts/article/article3.md +0 -20
- package/template/en-US/posts/article/article4.md +0 -20
- package/template/en-US/posts/article/article7.md +0 -20
- package/template/en-US/posts/article/article8.md +0 -20
- package/template/en-US/posts/article10.md +0 -20
- package/template/en-US/posts/article11.md +0 -20
- package/template/en-US/posts/article9.md +0 -20
- package/template/i18n/.vuepress/config.ts +0 -33
- package/template/i18n/.vuepress/navbar/en.ts +0 -52
- package/template/i18n/.vuepress/navbar/index.ts +0 -2
- package/template/i18n/.vuepress/navbar/zh.ts +0 -52
- package/template/i18n/.vuepress/public/favicon.ico +0 -0
- package/template/i18n/.vuepress/public/logo.png +0 -0
- package/template/i18n/.vuepress/public/logo.svg +0 -1
- package/template/i18n/.vuepress/sidebar/en.ts +0 -48
- package/template/i18n/.vuepress/sidebar/index.ts +0 -2
- package/template/i18n/.vuepress/sidebar/zh.ts +0 -48
- package/template/i18n/.vuepress/styles/index.scss +0 -0
- package/template/i18n/.vuepress/styles/palette.scss +0 -0
- package/template/i18n/.vuepress/themeConfig.ts +0 -124
- package/template/i18n/guide/markdown.md +0 -341
- package/template/i18n/guide/page.md +0 -66
- package/template/i18n/home.md +0 -110
- package/template/i18n/intro.md +0 -7
- package/template/i18n/posts/article/article2.md +0 -20
- package/template/i18n/posts/article/article5.md +0 -20
- package/template/i18n/posts/article/article6.md +0 -21
- package/template/i18n/posts/article12.md +0 -21
- package/template/i18n/zh/guide/markdown.md +0 -339
- package/template/i18n/zh/guide/page.md +0 -66
- package/template/i18n/zh/posts/article/article2.md +0 -20
- package/template/i18n/zh/posts/article/article4.md +0 -20
- package/template/zh-CN/.vuepress/config.ts +0 -28
- package/template/zh-CN/.vuepress/navbar.ts +0 -52
- package/template/zh-CN/.vuepress/public/favicon.ico +0 -0
- package/template/zh-CN/.vuepress/public/logo.png +0 -0
- package/template/zh-CN/.vuepress/public/logo.svg +0 -1
- package/template/zh-CN/.vuepress/sidebar.ts +0 -46
- package/template/zh-CN/.vuepress/styles/index.scss +0 -0
- package/template/zh-CN/.vuepress/styles/palette.scss +0 -0
- package/template/zh-CN/.vuepress/themeConfig.ts +0 -96
- package/template/zh-CN/README.md +0 -48
- package/template/zh-CN/guide/markdown.md +0 -339
- package/template/zh-CN/guide/page.md +0 -66
- package/template/zh-CN/home.md +0 -109
- package/template/zh-CN/posts/article/article1.md +0 -19
- package/template/zh-CN/posts/article/article3.md +0 -20
- package/template/zh-CN/posts/article/article5.md +0 -20
- package/template/zh-CN/posts/article/article6.md +0 -21
- package/template/zh-CN/posts/article/article7.md +0 -20
- package/template/zh-CN/posts/article/article8.md +0 -20
- package/template/zh-CN/posts/article10.md +0 -20
- package/template/zh-CN/posts/article11.md +0 -20
- package/template/zh-CN/posts/article12.md +0 -21
- package/template/zh-CN/posts/article9.md +0 -20
- package/tsconfig.build.json +0 -10
- package/tsconfig.json +0 -8
- /package/template/{i18n/zh/guide → blog/zh/demo}/encrypt.md +0 -0
- /package/template/{zh-CN/guide → docs/zh/demo}/encrypt.md +0 -0
- /package/template/{en-US/.vuepress/public → public}/favicon.ico +0 -0
- /package/template/{en-US/.vuepress/public → public}/logo.png +0 -0
- /package/template/{en-US/.vuepress/public → public}/logo.svg +0 -0
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
---
|
|
2
|
+
cover: /assets/images/cover2.jpg
|
|
2
3
|
icon: edit
|
|
3
4
|
date: 2022-01-12
|
|
4
5
|
category:
|
|
5
|
-
-
|
|
6
|
-
- CategoryB
|
|
6
|
+
- Vegetable
|
|
7
7
|
tag:
|
|
8
|
-
-
|
|
9
|
-
-
|
|
8
|
+
- red
|
|
9
|
+
- round
|
|
10
10
|
star: true
|
|
11
|
+
sticky: true
|
|
11
12
|
---
|
|
12
13
|
|
|
13
|
-
#
|
|
14
|
+
# Tomato
|
|
14
15
|
|
|
15
16
|
## Heading 2
|
|
16
17
|
|
|
@@ -4,7 +4,7 @@ icon: slides
|
|
|
4
4
|
layout: Slide
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
<!-- markdownlint-disable MD024 MD033 -->
|
|
7
|
+
<!-- markdownlint-disable MD024 MD033 MD051 -->
|
|
8
8
|
|
|
9
9
|
@slidestart
|
|
10
10
|
|
|
@@ -18,7 +18,7 @@ A simple slide demo and useful hints.
|
|
|
18
18
|
|
|
19
19
|
<!-- .element: class="r-fit-text" -->
|
|
20
20
|
|
|
21
|
-
> By Mr.Hope. Please scroll
|
|
21
|
+
> By Mr.Hope. Please scroll mouse wheel down to the next slide
|
|
22
22
|
|
|
23
23
|
---
|
|
24
24
|
|
|
@@ -42,7 +42,7 @@ Use `---` to mark horizontal slides
|
|
|
42
42
|
|
|
43
43
|
<!-- .element: class="fragment fade-in" -->
|
|
44
44
|
|
|
45
|
-
Use `--` to
|
|
45
|
+
Use `--` to separate vertical slides in a horizontal slide.
|
|
46
46
|
|
|
47
47
|
<!-- .element: class="fragment fade-in" -->
|
|
48
48
|
|
|
@@ -78,7 +78,7 @@ You can use all kinds of markup in slides.
|
|
|
78
78
|
|
|
79
79
|
Headings will transform to UPPERCASE by default.
|
|
80
80
|
|
|
81
|
-
Here is paragraph with some **bold**, _italic_, ~~
|
|
81
|
+
Here is paragraph with some **bold**, _italic_, ~~strike-through~~ text and a [link](https://mrhope.site), and it can auto break itself so you don't need to worry the length.
|
|
82
82
|
|
|
83
83
|
--
|
|
84
84
|
|
|
@@ -134,7 +134,7 @@ $$
|
|
|
134
134
|
|
|
135
135
|
You can use all kinds of markup in slides.
|
|
136
136
|
|
|
137
|
-
⚠**Note**: Table, hr and other
|
|
137
|
+
⚠**Note**: Table, hr and other nonstandard Markdown syntax is not supported.
|
|
138
138
|
|
|
139
139
|
---
|
|
140
140
|
|
|
@@ -174,7 +174,7 @@ You can use all kinds of markup in slides.
|
|
|
174
174
|
|
|
175
175
|
### Background
|
|
176
176
|
|
|
177
|
-
|
|
177
|
+
Custom background by adding `data-background` attribute to slide.
|
|
178
178
|
|
|
179
179
|
---
|
|
180
180
|
|
|
@@ -277,7 +277,7 @@ Add `fragment` and animation class to element.
|
|
|
277
277
|
|
|
278
278
|
## Fragment
|
|
279
279
|
|
|
280
|
-
###
|
|
280
|
+
### Multiple fragments
|
|
281
281
|
|
|
282
282
|
Multiple fragments can be applied to the same element sequentially by wrapping it
|
|
283
283
|
|
|
@@ -331,7 +331,7 @@ Multiple elements can appear at the same index.
|
|
|
331
331
|
|
|
332
332
|
<!-- .element: class="r-fit-text" -->
|
|
333
333
|
|
|
334
|
-
Transition can be changed by setting the `transition` config option globally or `data-transition` attribute on
|
|
334
|
+
Transition can be changed by setting the `transition` config option globally or `data-transition` attribute on slide.
|
|
335
335
|
|
|
336
336
|
Possible values:
|
|
337
337
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
home: true
|
|
3
|
-
layout:
|
|
3
|
+
layout: BlogHome
|
|
4
4
|
icon: home
|
|
5
5
|
title: 博客主页
|
|
6
6
|
heroImage: /logo.svg
|
|
@@ -41,8 +41,8 @@ projects:
|
|
|
41
41
|
footer: 自定义你的页脚文字
|
|
42
42
|
---
|
|
43
43
|
|
|
44
|
-
|
|
44
|
+
这是一个博客主页的案例。
|
|
45
45
|
|
|
46
|
-
要使用此布局,你应该在页面前端设置 `layout:
|
|
46
|
+
要使用此布局,你应该在页面前端设置 `layout: BlogHome` 和 `home: true`。
|
|
47
47
|
|
|
48
|
-
相关配置文档请见 [博客主页](https://
|
|
48
|
+
相关配置文档请见 [博客主页](https://theme-hope.vuejs.press/zh/guide/blog/home/)。
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
---
|
|
2
|
+
title: 主要功能与配置演示
|
|
2
3
|
index: false
|
|
3
|
-
icon:
|
|
4
|
+
icon: discover
|
|
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
|
- 侧边栏
|
|
@@ -0,0 +1,403 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Markdown 展示
|
|
3
|
+
icon: markdown
|
|
4
|
+
order: 2
|
|
5
|
+
category:
|
|
6
|
+
- 使用指南
|
|
7
|
+
tag:
|
|
8
|
+
- Markdown
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
VuePress 主要从 Markdown 文件生成页面。因此,你可以使用它轻松生成文档或博客站点。
|
|
12
|
+
|
|
13
|
+
你应该创建和编写 Markdown 文件,以便 VuePress 可以根据文件结构将它们转换为不同的页面。
|
|
14
|
+
|
|
15
|
+
<!-- more -->
|
|
16
|
+
|
|
17
|
+
## Markdown 介绍
|
|
18
|
+
|
|
19
|
+
如果你是一个新手,还不会编写 Markdown,请先阅读 [Markdown 介绍](https://theme-hope.vuejs.press/zh/cookbook/markdown/) 和 [Markdown 演示](https://theme-hope.vuejs.press/zh/cookbook/markdown/demo.html)。
|
|
20
|
+
|
|
21
|
+
## Markdown 配置
|
|
22
|
+
|
|
23
|
+
VuePress 通过 Frontmatter 为每个 Markdown 页面引入配置。
|
|
24
|
+
|
|
25
|
+
::: info
|
|
26
|
+
|
|
27
|
+
Frontmatter 是 VuePress 中很重要的一个概念,如果你不了解它,你需要阅读 [Frontmatter 介绍](https://theme-hope.vuejs.press/zh/cookbook/vuepress/page.html#front-matter)。
|
|
28
|
+
|
|
29
|
+
:::
|
|
30
|
+
|
|
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 扩展
|
|
36
|
+
|
|
37
|
+
为了丰富文档写作,VuePress 对 Markdown 语法进行了扩展。
|
|
38
|
+
|
|
39
|
+
关于这些扩展,请阅读 [VuePress 中的 Markdown 扩展](https://theme-hope.vuejs.press/zh/cookbook/vuepress/markdown.html)。
|
|
40
|
+
|
|
41
|
+
### 主题扩展
|
|
42
|
+
|
|
43
|
+
通过 [`vuepress-plugin-md-enhance`][md-enhance],主题扩展了更多 Markdown 语法,提供更加丰富的写作功能。
|
|
44
|
+
|
|
45
|
+
#### 自定义容器
|
|
46
|
+
|
|
47
|
+
::: v-pre
|
|
48
|
+
|
|
49
|
+
安全的在 Markdown 中使用 {{ variable }}。
|
|
50
|
+
|
|
51
|
+
:::
|
|
52
|
+
|
|
53
|
+
::: info 自定义标题
|
|
54
|
+
|
|
55
|
+
信息容器,包含 `代码` 与 [链接](#自定义容器)。
|
|
56
|
+
|
|
57
|
+
```js
|
|
58
|
+
const a = 1;
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
:::
|
|
62
|
+
|
|
63
|
+
::: tip 自定义标题
|
|
64
|
+
|
|
65
|
+
提示容器
|
|
66
|
+
|
|
67
|
+
:::
|
|
68
|
+
|
|
69
|
+
::: warning 自定义标题
|
|
70
|
+
|
|
71
|
+
警告容器
|
|
72
|
+
|
|
73
|
+
:::
|
|
74
|
+
|
|
75
|
+
::: danger 自定义标题
|
|
76
|
+
|
|
77
|
+
危险容器
|
|
78
|
+
|
|
79
|
+
:::
|
|
80
|
+
|
|
81
|
+
::: details 自定义标题
|
|
82
|
+
|
|
83
|
+
详情容器
|
|
84
|
+
|
|
85
|
+
:::
|
|
86
|
+
|
|
87
|
+
- [查看详情](https://theme-hope.vuejs.press/zh/guide/markdown/container.html)
|
|
88
|
+
|
|
89
|
+
#### 代码块
|
|
90
|
+
|
|
91
|
+
::: code-tabs
|
|
92
|
+
|
|
93
|
+
@tab pnpm
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
pnpm add -D vuepress-theme-hope
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
@tab yarn
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
yarn add -D vuepress-theme-hope
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
@tab:active npm
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
npm i -D vuepress-theme-hope
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
:::
|
|
112
|
+
|
|
113
|
+
- [查看详情](https://theme-hope.vuejs.press/zh/guide/markdown/code-tabs.html)
|
|
114
|
+
|
|
115
|
+
#### 上下角标
|
|
116
|
+
|
|
117
|
+
19^th^ H~2~O
|
|
118
|
+
|
|
119
|
+
- [查看详情](https://theme-hope.vuejs.press/zh/guide/markdown/sup-sub.html)
|
|
120
|
+
|
|
121
|
+
#### 自定义对齐
|
|
122
|
+
|
|
123
|
+
::: center
|
|
124
|
+
|
|
125
|
+
我是居中的
|
|
126
|
+
|
|
127
|
+
:::
|
|
128
|
+
|
|
129
|
+
::: right
|
|
130
|
+
|
|
131
|
+
我在右对齐
|
|
132
|
+
|
|
133
|
+
:::
|
|
134
|
+
|
|
135
|
+
- [查看详情](https://theme-hope.vuejs.press/zh/guide/markdown/align.html)
|
|
136
|
+
|
|
137
|
+
#### Attrs
|
|
138
|
+
|
|
139
|
+
一个拥有 ID 的 **单词**{#word}。
|
|
140
|
+
|
|
141
|
+
- [查看详情](https://theme-hope.vuejs.press/zh/guide/markdown/attrs.html)
|
|
142
|
+
|
|
143
|
+
#### 脚注
|
|
144
|
+
|
|
145
|
+
此文字有脚注[^first].
|
|
146
|
+
|
|
147
|
+
[^first]: 这是脚注内容
|
|
148
|
+
|
|
149
|
+
- [查看详情](https://theme-hope.vuejs.press/zh/guide/markdown/footnote.html)
|
|
150
|
+
|
|
151
|
+
#### 标记
|
|
152
|
+
|
|
153
|
+
你可以标记 ==重要的内容== 。
|
|
154
|
+
|
|
155
|
+
- [查看详情](https://theme-hope.vuejs.press/zh/guide/markdown/mark.html)
|
|
156
|
+
|
|
157
|
+
#### 任务列表
|
|
158
|
+
|
|
159
|
+
- [x] 计划 1
|
|
160
|
+
- [ ] 计划 2
|
|
161
|
+
|
|
162
|
+
- [查看详情](https://theme-hope.vuejs.press/zh/guide/markdown/tasklist.html)
|
|
163
|
+
|
|
164
|
+
### 图片增强
|
|
165
|
+
|
|
166
|
+
支持为图片设置颜色模式和大小
|
|
167
|
+
|
|
168
|
+
- [查看详情](https://theme-hope.vuejs.press/zh/guide/markdown/image.html)
|
|
169
|
+
|
|
170
|
+
#### 卡片
|
|
171
|
+
|
|
172
|
+
```card
|
|
173
|
+
title: Mr.Hope
|
|
174
|
+
desc: Where there is light, there is hope
|
|
175
|
+
logo: https://mrhope.site/logo.svg
|
|
176
|
+
link: https://mrhope.site
|
|
177
|
+
color: rgba(253, 230, 138, 0.15)
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
- [查看详情](https://theme-hope.vuejs.press/zh/guide/markdown/card.html)
|
|
181
|
+
|
|
182
|
+
#### 图表
|
|
183
|
+
|
|
184
|
+
::: chart 一个散点图案例
|
|
185
|
+
|
|
186
|
+
```json
|
|
187
|
+
{
|
|
188
|
+
"type": "scatter",
|
|
189
|
+
"data": {
|
|
190
|
+
"datasets": [
|
|
191
|
+
{
|
|
192
|
+
"label": "散点数据集",
|
|
193
|
+
"data": [
|
|
194
|
+
{ "x": -10, "y": 0 },
|
|
195
|
+
{ "x": 0, "y": 10 },
|
|
196
|
+
{ "x": 10, "y": 5 },
|
|
197
|
+
{ "x": 0.5, "y": 5.5 }
|
|
198
|
+
],
|
|
199
|
+
"backgroundColor": "rgb(255, 99, 132)"
|
|
200
|
+
}
|
|
201
|
+
]
|
|
202
|
+
},
|
|
203
|
+
"options": {
|
|
204
|
+
"scales": {
|
|
205
|
+
"x": {
|
|
206
|
+
"type": "linear",
|
|
207
|
+
"position": "bottom"
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
:::
|
|
215
|
+
|
|
216
|
+
- [查看详情](https://theme-hope.vuejs.press/zh/guide/markdown/chart.html)
|
|
217
|
+
|
|
218
|
+
#### Echarts
|
|
219
|
+
|
|
220
|
+
::: echarts 一个折线图案例
|
|
221
|
+
|
|
222
|
+
```json
|
|
223
|
+
{
|
|
224
|
+
"xAxis": {
|
|
225
|
+
"type": "category",
|
|
226
|
+
"data": ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"]
|
|
227
|
+
},
|
|
228
|
+
"yAxis": {
|
|
229
|
+
"type": "value"
|
|
230
|
+
},
|
|
231
|
+
"series": [
|
|
232
|
+
{
|
|
233
|
+
"data": [150, 230, 224, 218, 135, 147, 260],
|
|
234
|
+
"type": "line"
|
|
235
|
+
}
|
|
236
|
+
]
|
|
237
|
+
}
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
:::
|
|
241
|
+
|
|
242
|
+
- [查看详情](https://theme-hope.vuejs.press/zh/guide/markdown/echarts.html)
|
|
243
|
+
|
|
244
|
+
#### 流程图
|
|
245
|
+
|
|
246
|
+
```flow
|
|
247
|
+
cond=>condition: 是否执行操作?
|
|
248
|
+
process=>operation: 操作
|
|
249
|
+
e=>end: 结束
|
|
250
|
+
|
|
251
|
+
cond(yes)->process->e
|
|
252
|
+
cond(no)->e
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
- [查看详情](https://theme-hope.vuejs.press/zh/guide/markdown/flowchart.html)
|
|
256
|
+
|
|
257
|
+
#### Mermaid
|
|
258
|
+
|
|
259
|
+
```mermaid
|
|
260
|
+
---
|
|
261
|
+
title: Flowchart
|
|
262
|
+
---
|
|
263
|
+
flowchart TB
|
|
264
|
+
c1-->a2
|
|
265
|
+
subgraph one
|
|
266
|
+
a1-->a2
|
|
267
|
+
end
|
|
268
|
+
subgraph two
|
|
269
|
+
b1-->b2
|
|
270
|
+
end
|
|
271
|
+
subgraph three
|
|
272
|
+
c1-->c2
|
|
273
|
+
end
|
|
274
|
+
one --> two
|
|
275
|
+
three --> two
|
|
276
|
+
two --> c2
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
- [查看详情](https://theme-hope.vuejs.press/zh/guide/markdown/mermaid.html)
|
|
280
|
+
|
|
281
|
+
#### Tex 语法
|
|
282
|
+
|
|
283
|
+
$$
|
|
284
|
+
\frac {\partial^r} {\partial \omega^r} \left(\frac {y^{\omega}} {\omega}\right)
|
|
285
|
+
= \left(\frac {y^{\omega}} {\omega}\right) \left\{(\log y)^r + \sum_{i=1}^r \frac {(-1)^i r \cdots (r-i+1) (\log y)^{r-i}} {\omega^i} \right\}
|
|
286
|
+
$$
|
|
287
|
+
|
|
288
|
+
- [查看详情](https://theme-hope.vuejs.press/zh/guide/markdown/tex.html)
|
|
289
|
+
|
|
290
|
+
#### 导入文件
|
|
291
|
+
|
|
292
|
+
<!-- @include: ./README.md{11-17} -->
|
|
293
|
+
|
|
294
|
+
- [查看详情](https://theme-hope.vuejs.press/zh/guide/markdown/include.html)
|
|
295
|
+
|
|
296
|
+
#### 代码演示
|
|
297
|
+
|
|
298
|
+
::: normal-demo 一个普通 Demo
|
|
299
|
+
|
|
300
|
+
```html
|
|
301
|
+
<h1>VuePress Theme Hope</h1>
|
|
302
|
+
<p><span id="very">非常</span>强大!</p>
|
|
303
|
+
```
|
|
304
|
+
|
|
305
|
+
```js
|
|
306
|
+
document.querySelector("#very").addEventListener("click", () => {
|
|
307
|
+
alert("非常强大");
|
|
308
|
+
});
|
|
309
|
+
```
|
|
310
|
+
|
|
311
|
+
```css
|
|
312
|
+
span {
|
|
313
|
+
color: red;
|
|
314
|
+
}
|
|
315
|
+
```
|
|
316
|
+
|
|
317
|
+
:::
|
|
318
|
+
|
|
319
|
+
- [查看详情](https://theme-hope.vuejs.press/zh/guide/markdown/demo.html)
|
|
320
|
+
|
|
321
|
+
#### 样式化
|
|
322
|
+
|
|
323
|
+
向 Mr.Hope 捐赠一杯咖啡。 _Recommended_
|
|
324
|
+
|
|
325
|
+
- [查看详情](https://theme-hope.vuejs.press/zh/guide/markdown/stylize.html)
|
|
326
|
+
|
|
327
|
+
#### 交互演示
|
|
328
|
+
|
|
329
|
+
::: playground#ts TS 案例
|
|
330
|
+
|
|
331
|
+
@file index.ts
|
|
332
|
+
|
|
333
|
+
```ts
|
|
334
|
+
const msg = "hello world";
|
|
335
|
+
|
|
336
|
+
const speak = (msg: string) => console.log(msg);
|
|
337
|
+
|
|
338
|
+
speak(msg);
|
|
339
|
+
```
|
|
340
|
+
|
|
341
|
+
:::
|
|
342
|
+
|
|
343
|
+
- [查看详情](https://theme-hope.vuejs.press/zh/guide/markdown/playground.html)
|
|
344
|
+
|
|
345
|
+
#### Vue 交互演示
|
|
346
|
+
|
|
347
|
+
::: vue-playground Vue 交互演示
|
|
348
|
+
|
|
349
|
+
@file App.vue
|
|
350
|
+
|
|
351
|
+
```vue
|
|
352
|
+
<script setup>
|
|
353
|
+
import { ref } from "vue";
|
|
354
|
+
|
|
355
|
+
const msg = ref("Hello World!");
|
|
356
|
+
</script>
|
|
357
|
+
|
|
358
|
+
<template>
|
|
359
|
+
<h1>{{ msg }}</h1>
|
|
360
|
+
<input v-model="msg" />
|
|
361
|
+
</template>
|
|
362
|
+
```
|
|
363
|
+
|
|
364
|
+
:::
|
|
365
|
+
|
|
366
|
+
- [查看详情](https://theme-hope.vuejs.press/zh/guide/markdown/vue-playground.html)
|
|
367
|
+
|
|
368
|
+
#### 幻灯片
|
|
369
|
+
|
|
370
|
+
@slidestart
|
|
371
|
+
|
|
372
|
+
## 幻灯片 1
|
|
373
|
+
|
|
374
|
+
一个有文字和 [链接](https://mrhope.site) 的段落
|
|
375
|
+
|
|
376
|
+
---
|
|
377
|
+
|
|
378
|
+
## 幻灯片 2
|
|
379
|
+
|
|
380
|
+
- 项目 1
|
|
381
|
+
- 项目 2
|
|
382
|
+
|
|
383
|
+
---
|
|
384
|
+
|
|
385
|
+
## 幻灯片 3.1
|
|
386
|
+
|
|
387
|
+
```js
|
|
388
|
+
const a = 1;
|
|
389
|
+
```
|
|
390
|
+
|
|
391
|
+
--
|
|
392
|
+
|
|
393
|
+
## 幻灯片 3.2
|
|
394
|
+
|
|
395
|
+
$$
|
|
396
|
+
J(\theta_0,\theta_1) = \sum_{i=0}
|
|
397
|
+
$$
|
|
398
|
+
|
|
399
|
+
@slideend
|
|
400
|
+
|
|
401
|
+
- [查看详情](https://theme-hope.vuejs.press/zh/guide/markdown/presentation.html)
|
|
402
|
+
|
|
403
|
+
[md-enhance]: https://plugin-md-enhance.vuejs.press/zh/
|