create-vuepress-theme-hope 2.0.0-beta.21 → 2.0.0-beta.210

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.
Files changed (184) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +35 -0
  3. package/lib/index.js +65 -0
  4. package/package.json +25 -14
  5. package/template/blog/.vuepress/config.ts +24 -0
  6. package/template/blog/.vuepress/navbar/en.ts +52 -0
  7. package/template/blog/.vuepress/navbar/index.ts +2 -0
  8. package/template/blog/.vuepress/navbar/zh.ts +52 -0
  9. package/template/blog/.vuepress/public/assets/images/cover1.jpg +0 -0
  10. package/template/blog/.vuepress/public/assets/images/cover2.jpg +0 -0
  11. package/template/blog/.vuepress/public/assets/images/cover3.jpg +0 -0
  12. package/template/blog/.vuepress/sidebar/en.ts +22 -0
  13. package/template/blog/.vuepress/sidebar/index.ts +2 -0
  14. package/template/blog/.vuepress/sidebar/zh.ts +22 -0
  15. package/template/blog/.vuepress/styles/config.scss +3 -0
  16. package/template/blog/.vuepress/styles/index.scss +1 -0
  17. package/template/blog/.vuepress/styles/palette.scss +2 -0
  18. package/template/blog/.vuepress/theme.ts +224 -0
  19. package/template/{i18n → blog}/README.md +5 -5
  20. package/template/{i18n/guide → blog/demo}/README.md +5 -4
  21. package/template/{i18n/guide → blog/demo}/disable.md +4 -4
  22. package/template/{i18n/guide → blog/demo}/encrypt.md +1 -1
  23. package/template/blog/demo/markdown.md +423 -0
  24. package/template/blog/demo/page.md +74 -0
  25. package/template/blog/intro.md +8 -0
  26. package/template/{i18n/posts/article/article1.md → blog/posts/apple/1.md} +5 -4
  27. package/template/{en-US/posts/article/article2.md → blog/posts/apple/2.md} +9 -4
  28. package/template/{i18n/posts/article/article3.md → blog/posts/apple/3.md} +6 -5
  29. package/template/{i18n/posts/article/article4.md → blog/posts/apple/4.md} +6 -5
  30. package/template/{en-US/posts/article/article5.md → blog/posts/banana/1.md} +6 -5
  31. package/template/{en-US/posts/article/article6.md → blog/posts/banana/2.md} +10 -5
  32. package/template/{i18n/posts/article/article7.md → blog/posts/banana/3.md} +5 -5
  33. package/template/{i18n/posts/article/article8.md → blog/posts/banana/4.md} +5 -5
  34. package/template/{i18n/posts/article9.md → blog/posts/cherry.md} +5 -5
  35. package/template/{i18n/posts/article10.md → blog/posts/dragonfruit.md} +5 -5
  36. package/template/{i18n/posts/article11.md → blog/posts/strawberry.md} +5 -5
  37. package/template/{en-US/posts/article12.md → blog/posts/tomato.md} +6 -5
  38. package/template/{i18n/slide.md → blog/slides.md} +8 -8
  39. package/template/{i18n → blog}/zh/README.md +4 -4
  40. package/template/{i18n/zh/guide → blog/zh/demo}/README.md +5 -4
  41. package/template/{i18n/zh/guide → blog/zh/demo}/disable.md +4 -4
  42. package/template/blog/zh/demo/markdown.md +403 -0
  43. package/template/blog/zh/demo/page.md +74 -0
  44. package/template/blog/zh/intro.md +8 -0
  45. package/template/{i18n/zh/posts/article/article1.md → blog/zh/posts/apple/1.md} +5 -4
  46. package/template/{zh-CN/posts/article/article2.md → blog/zh/posts/apple/2.md} +9 -4
  47. package/template/{i18n/zh/posts/article/article3.md → blog/zh/posts/apple/3.md} +6 -5
  48. package/template/{zh-CN/posts/article/article4.md → blog/zh/posts/apple/4.md} +6 -5
  49. package/template/{i18n/zh/posts/article/article5.md → blog/zh/posts/banana/1.md} +6 -5
  50. package/template/{i18n/zh/posts/article/article6.md → blog/zh/posts/banana/2.md} +10 -5
  51. package/template/{i18n/zh/posts/article/article7.md → blog/zh/posts/banana/3.md} +5 -5
  52. package/template/{i18n/zh/posts/article/article8.md → blog/zh/posts/banana/4.md} +5 -5
  53. package/template/{i18n/zh/posts/article9.md → blog/zh/posts/cherry.md} +5 -5
  54. package/template/{i18n/zh/posts/article10.md → blog/zh/posts/dragonfruit.md} +5 -5
  55. package/template/{i18n/zh/posts/article11.md → blog/zh/posts/strawberry.md} +5 -5
  56. package/template/{i18n/zh/posts/article12.md → blog/zh/posts/tomato.md} +6 -5
  57. package/template/{i18n/zh/slide.md → blog/zh/slides.md} +1 -1
  58. package/template/docs/.vuepress/config.ts +24 -0
  59. package/template/docs/.vuepress/navbar/en.ts +30 -0
  60. package/template/docs/.vuepress/navbar/index.ts +2 -0
  61. package/template/docs/.vuepress/navbar/zh.ts +30 -0
  62. package/template/docs/.vuepress/sidebar/en.ts +21 -0
  63. package/template/docs/.vuepress/sidebar/index.ts +2 -0
  64. package/template/docs/.vuepress/sidebar/zh.ts +21 -0
  65. package/template/docs/.vuepress/styles/config.scss +3 -0
  66. package/template/docs/.vuepress/styles/index.scss +1 -0
  67. package/template/docs/.vuepress/styles/palette.scss +2 -0
  68. package/template/docs/.vuepress/theme.ts +172 -0
  69. package/template/{en-US/home.md → docs/README.md} +28 -28
  70. package/template/{en-US/guide → docs/demo}/README.md +5 -4
  71. package/template/{en-US/guide → docs/demo}/disable.md +4 -4
  72. package/template/{en-US/guide → docs/demo}/encrypt.md +1 -1
  73. package/template/docs/demo/markdown.md +423 -0
  74. package/template/docs/demo/page.md +72 -0
  75. package/template/docs/guide/README.md +16 -0
  76. package/template/docs/guide/bar/README.md +13 -0
  77. package/template/docs/guide/bar/baz.md +6 -0
  78. package/template/docs/guide/foo/README.md +13 -0
  79. package/template/docs/guide/foo/ray.md +6 -0
  80. package/template/{en-US/slide.md → docs/slides.md} +8 -8
  81. package/template/{i18n/zh/home.md → docs/zh/README.md} +24 -24
  82. package/template/{zh-CN/guide → docs/zh/demo}/README.md +5 -4
  83. package/template/{zh-CN/guide → docs/zh/demo}/disable.md +4 -4
  84. package/template/docs/zh/demo/markdown.md +403 -0
  85. package/template/docs/zh/demo/page.md +72 -0
  86. package/template/docs/zh/guide/README.md +16 -0
  87. package/template/docs/zh/guide/bar/README.md +13 -0
  88. package/template/docs/zh/guide/bar/baz.md +6 -0
  89. package/template/docs/zh/guide/foo/README.md +13 -0
  90. package/template/docs/zh/guide/foo/ray.md +6 -0
  91. package/template/{zh-CN/slide.md → docs/zh/slides.md} +1 -1
  92. package/template/public/assets/icon/apple-icon-152.png +0 -0
  93. package/template/public/assets/icon/chrome-192.png +0 -0
  94. package/template/public/assets/icon/chrome-512.png +0 -0
  95. package/template/public/assets/icon/chrome-mask-192.png +0 -0
  96. package/template/public/assets/icon/chrome-mask-512.png +0 -0
  97. package/template/public/assets/icon/guide-maskable.png +0 -0
  98. package/template/public/assets/icon/ms-icon-144.png +0 -0
  99. package/CHANGELOG.md +0 -184
  100. package/lib/node/index.d.ts +0 -1
  101. package/lib/node/index.js +0 -3
  102. package/lib/node/index.js.map +0 -1
  103. package/readme.md +0 -33
  104. package/rollup.config.js +0 -14
  105. package/src/node/checkVersion.ts +0 -31
  106. package/src/node/copy.ts +0 -45
  107. package/src/node/deepAssign.ts +0 -42
  108. package/src/node/hasYarn.ts +0 -10
  109. package/src/node/i18n.ts +0 -91
  110. package/src/node/index.ts +0 -177
  111. package/src/node/registry.ts +0 -31
  112. package/template/en-US/.vuepress/config.ts +0 -28
  113. package/template/en-US/.vuepress/navbar.ts +0 -52
  114. package/template/en-US/.vuepress/sidebar.ts +0 -46
  115. package/template/en-US/.vuepress/styles/index.scss +0 -0
  116. package/template/en-US/.vuepress/styles/palette.scss +0 -0
  117. package/template/en-US/.vuepress/themeConfig.ts +0 -96
  118. package/template/en-US/README.md +0 -48
  119. package/template/en-US/guide/markdown.md +0 -341
  120. package/template/en-US/guide/page.md +0 -66
  121. package/template/en-US/intro.md +0 -7
  122. package/template/en-US/posts/article/article1.md +0 -19
  123. package/template/en-US/posts/article/article3.md +0 -20
  124. package/template/en-US/posts/article/article4.md +0 -20
  125. package/template/en-US/posts/article/article7.md +0 -20
  126. package/template/en-US/posts/article/article8.md +0 -20
  127. package/template/en-US/posts/article10.md +0 -20
  128. package/template/en-US/posts/article11.md +0 -20
  129. package/template/en-US/posts/article9.md +0 -20
  130. package/template/i18n/.vuepress/config.ts +0 -33
  131. package/template/i18n/.vuepress/navbar/en.ts +0 -52
  132. package/template/i18n/.vuepress/navbar/index.ts +0 -2
  133. package/template/i18n/.vuepress/navbar/zh.ts +0 -52
  134. package/template/i18n/.vuepress/public/favicon.ico +0 -0
  135. package/template/i18n/.vuepress/public/logo.png +0 -0
  136. package/template/i18n/.vuepress/public/logo.svg +0 -1
  137. package/template/i18n/.vuepress/sidebar/en.ts +0 -48
  138. package/template/i18n/.vuepress/sidebar/index.ts +0 -2
  139. package/template/i18n/.vuepress/sidebar/zh.ts +0 -48
  140. package/template/i18n/.vuepress/styles/index.scss +0 -0
  141. package/template/i18n/.vuepress/styles/palette.scss +0 -0
  142. package/template/i18n/.vuepress/themeConfig.ts +0 -124
  143. package/template/i18n/guide/markdown.md +0 -341
  144. package/template/i18n/guide/page.md +0 -66
  145. package/template/i18n/home.md +0 -110
  146. package/template/i18n/intro.md +0 -7
  147. package/template/i18n/posts/article/article2.md +0 -20
  148. package/template/i18n/posts/article/article5.md +0 -20
  149. package/template/i18n/posts/article/article6.md +0 -21
  150. package/template/i18n/posts/article12.md +0 -21
  151. package/template/i18n/zh/guide/markdown.md +0 -339
  152. package/template/i18n/zh/guide/page.md +0 -66
  153. package/template/i18n/zh/posts/article/article2.md +0 -20
  154. package/template/i18n/zh/posts/article/article4.md +0 -20
  155. package/template/zh-CN/.vuepress/config.ts +0 -28
  156. package/template/zh-CN/.vuepress/navbar.ts +0 -52
  157. package/template/zh-CN/.vuepress/public/favicon.ico +0 -0
  158. package/template/zh-CN/.vuepress/public/logo.png +0 -0
  159. package/template/zh-CN/.vuepress/public/logo.svg +0 -1
  160. package/template/zh-CN/.vuepress/sidebar.ts +0 -46
  161. package/template/zh-CN/.vuepress/styles/index.scss +0 -0
  162. package/template/zh-CN/.vuepress/styles/palette.scss +0 -0
  163. package/template/zh-CN/.vuepress/themeConfig.ts +0 -96
  164. package/template/zh-CN/README.md +0 -48
  165. package/template/zh-CN/guide/markdown.md +0 -339
  166. package/template/zh-CN/guide/page.md +0 -66
  167. package/template/zh-CN/home.md +0 -109
  168. package/template/zh-CN/posts/article/article1.md +0 -19
  169. package/template/zh-CN/posts/article/article3.md +0 -20
  170. package/template/zh-CN/posts/article/article5.md +0 -20
  171. package/template/zh-CN/posts/article/article6.md +0 -21
  172. package/template/zh-CN/posts/article/article7.md +0 -20
  173. package/template/zh-CN/posts/article/article8.md +0 -20
  174. package/template/zh-CN/posts/article10.md +0 -20
  175. package/template/zh-CN/posts/article11.md +0 -20
  176. package/template/zh-CN/posts/article12.md +0 -21
  177. package/template/zh-CN/posts/article9.md +0 -20
  178. package/tsconfig.build.json +0 -10
  179. package/tsconfig.json +0 -8
  180. /package/template/{i18n/zh/guide → blog/zh/demo}/encrypt.md +0 -0
  181. /package/template/{zh-CN/guide → docs/zh/demo}/encrypt.md +0 -0
  182. /package/template/{en-US/.vuepress/public → public}/favicon.ico +0 -0
  183. /package/template/{en-US/.vuepress/public → public}/logo.png +0 -0
  184. /package/template/{en-US/.vuepress/public → public}/logo.svg +0 -0
@@ -0,0 +1,74 @@
1
+ ---
2
+ # 这是文章的标题
3
+ title: 页面配置
4
+ # You can customize cover image
5
+ cover: /assets/images/cover1.jpg
6
+ # 这是页面的图标
7
+ icon: page
8
+ # 这是侧边栏的顺序
9
+ order: 1
10
+ # 设置作者
11
+ author: Ms.Hope
12
+ # 设置写作时间
13
+ date: 2020-01-01
14
+ # 一个页面可以有多个分类
15
+ category:
16
+ - 使用指南
17
+ # 一个页面可以有多个标签
18
+ tag:
19
+ - 页面配置
20
+ - 使用指南
21
+ # 此页面会在文章列表置顶
22
+ sticky: true
23
+ # 此页面会出现在文章收藏中
24
+ star: true
25
+ # 你可以自定义页脚
26
+ footer: 这是测试显示的页脚
27
+ # 你可以自定义版权信息
28
+ copyright: 无版权
29
+ ---
30
+
31
+ `more` 注释之前的内容被视为文章摘要。
32
+
33
+ <!-- more -->
34
+
35
+ ## 页面信息
36
+
37
+ 你可以在 Markdown 的 Frontmatter 中设置页面信息。
38
+
39
+ - 作者设置为 Ms.Hope。
40
+ - 写作日期为 2020 年 1 月 1 日
41
+ - 分类为 “使用指南”
42
+ - 标签为 “页面配置” 和 “使用指南”
43
+
44
+ ## 页面内容
45
+
46
+ 你可以自由在这里书写你的 Markdown。
47
+
48
+ ::: tip
49
+
50
+ - 你可以将图片和 Markdown 文件放置在一起,但是你需要使用**相对链接**`./` 进行引用。
51
+
52
+ - 对于 `.vuepress/public` 文件夹的图片,请使用绝对链接 `/` 进行引用。
53
+
54
+ :::
55
+
56
+ 主题包含了一个自定义徽章可以使用:
57
+
58
+ > 文字结尾应该有深蓝色的 徽章文字 徽章。 <Badge text="徽章文字" color="#242378" />
59
+
60
+ ## 页面结构
61
+
62
+ 此页面应当包含:
63
+
64
+ - [路径导航](https://theme-hope.vuejs.press/zh/guide/layout/breadcrumb.html)
65
+ - [标题和页面信息](https://theme-hope.vuejs.press/zh/guide/feature/page-info.html)
66
+ - [TOC (文章标题列表)](https://theme-hope.vuejs.press/zh/guide/layout/page.html#标题列表)
67
+ - [贡献者、更新时间等页面元信息](https://theme-hope.vuejs.press/guide/feature/meta.html)
68
+ - [评论](https://theme-hope.vuejs.press/zh/guide/feature/comment.html)
69
+ - [导航栏](https://theme-hope.vuejs.press/zh/guide/layout/navbar.html)
70
+ - [侧边栏](https://theme-hope.vuejs.press/zh/guide/layout/sidebar.html)
71
+ - [页脚](https://theme-hope.vuejs.press/zh/guide/layout/footer.html)
72
+ - 返回顶部按钮
73
+
74
+ 你可以通过主题选项和页面 Frontmatter 自定义它们。
@@ -0,0 +1,8 @@
1
+ ---
2
+ icon: info
3
+ cover: /assets/images/cover3.jpg
4
+ ---
5
+
6
+ # 介绍页
7
+
8
+ 将你的个人介绍和档案放置在此处。
@@ -2,13 +2,14 @@
2
2
  icon: edit
3
3
  date: 2022-01-01
4
4
  category:
5
- - CategoryA
5
+ - 苹果
6
6
  tag:
7
- - tag A
8
- - tag B
7
+ - 红
8
+ - 大
9
+ - 圆
9
10
  ---
10
11
 
11
- # 文章 1
12
+ # 苹果 1
12
13
 
13
14
  ## 标题 2
14
15
 
@@ -2,14 +2,19 @@
2
2
  icon: edit
3
3
  date: 2022-01-02
4
4
  category:
5
- - CategoryA
5
+ - 苹果
6
6
  tag:
7
- - tag A
8
- - tag B
7
+ - 红
8
+ - 大
9
+ - 圆
9
10
  star: true
10
11
  ---
11
12
 
12
- # 文章 2
13
+ # 苹果 2
14
+
15
+ 一个被星标了的苹果文章。
16
+
17
+ <!-- more -->
13
18
 
14
19
  ## 标题 2
15
20
 
@@ -2,14 +2,15 @@
2
2
  icon: edit
3
3
  date: 2022-01-03
4
4
  category:
5
- - CategoryA
6
- - CategoryB
5
+ - 苹果
6
+ - 水果
7
7
  tag:
8
- - tag A
9
- - tag B
8
+ - 红
9
+ - 大
10
+ - 圆
10
11
  ---
11
12
 
12
- # 文章 3
13
+ # 苹果 3
13
14
 
14
15
  ## 标题 2
15
16
 
@@ -2,14 +2,15 @@
2
2
  icon: edit
3
3
  date: 2022-01-04
4
4
  category:
5
- - CategoryA
6
- - CategoryB
5
+ - 苹果
6
+ - 水果
7
7
  tag:
8
- - tag A
9
- - tag B
8
+ - 红
9
+ - 大
10
+ - 圆
10
11
  ---
11
12
 
12
- # 文章 4
13
+ # 苹果 4
13
14
 
14
15
  ## 标题 2
15
16
 
@@ -2,14 +2,15 @@
2
2
  icon: edit
3
3
  date: 2022-01-05
4
4
  category:
5
- - CategoryA
6
- - CategoryB
5
+ - 香蕉
6
+ - 水果
7
7
  tag:
8
- - tag A
9
- - tag B
8
+ - 黄
9
+ - 弯曲的
10
+ - 长
10
11
  ---
11
12
 
12
- # 文章 5
13
+ # 香蕉 1
13
14
 
14
15
  ## 标题 2
15
16
 
@@ -2,15 +2,20 @@
2
2
  icon: edit
3
3
  date: 2022-01-06
4
4
  category:
5
- - CategoryA
6
- - CategoryB
5
+ - 香蕉
6
+ - 水果
7
7
  tag:
8
- - tag A
9
- - tag B
8
+ - 黄
9
+ - 弯曲的
10
+ - 长
10
11
  star: 10
11
12
  ---
12
13
 
13
- # 文章 6
14
+ # 香蕉 2
15
+
16
+ 一个被数字 `10` 星标了的香蕉文章。
17
+
18
+ <!-- more -->
14
19
 
15
20
  ## 标题 2
16
21
 
@@ -2,14 +2,14 @@
2
2
  icon: edit
3
3
  date: 2022-01-07
4
4
  category:
5
- - CategoryA
6
- - CategoryB
5
+ - 香蕉
7
6
  tag:
8
- - tag A
9
- - tag B
7
+ - 黄
8
+ - 弯曲的
9
+ - 长
10
10
  ---
11
11
 
12
- # 文章 7
12
+ # 香蕉 3
13
13
 
14
14
  ## 标题 2
15
15
 
@@ -2,14 +2,14 @@
2
2
  icon: edit
3
3
  date: 2022-01-08
4
4
  category:
5
- - CategoryA
6
- - CategoryB
5
+ - 香蕉
7
6
  tag:
8
- - tag A
9
- - tag B
7
+ - 黄
8
+ - 弯曲的
9
+ - 长
10
10
  ---
11
11
 
12
- # 文章 8
12
+ # 香蕉 4
13
13
 
14
14
  ## 标题 2
15
15
 
@@ -2,14 +2,14 @@
2
2
  icon: edit
3
3
  date: 2022-01-09
4
4
  category:
5
- - CategoryA
6
- - CategoryB
5
+ - 樱桃
7
6
  tag:
8
- - tag A
9
- - tag B
7
+ - 红
8
+ - 小
9
+ - 圆
10
10
  ---
11
11
 
12
- # 文章 9
12
+ # 樱桃
13
13
 
14
14
  ## 标题 2
15
15
 
@@ -2,14 +2,14 @@
2
2
  icon: edit
3
3
  date: 2022-01-10
4
4
  category:
5
- - CategoryA
6
- - CategoryB
5
+ - 火龙果
6
+ - 水果
7
7
  tag:
8
- - tag A
9
- - tag B
8
+ - 红
9
+ - 大
10
10
  ---
11
11
 
12
- # 文章 10
12
+ # 火龙果
13
13
 
14
14
  ## 标题 2
15
15
 
@@ -2,14 +2,14 @@
2
2
  icon: edit
3
3
  date: 2022-01-11
4
4
  category:
5
- - CategoryA
6
- - CategoryB
5
+ - 水果
6
+ - 草莓
7
7
  tag:
8
- - tag A
9
- - tag B
8
+ - 红
9
+ - 小
10
10
  ---
11
11
 
12
- # 文章 11
12
+ # 草莓
13
13
 
14
14
  ## 标题 2
15
15
 
@@ -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
- - CategoryA
6
- - CategoryB
6
+ - 蔬菜
7
7
  tag:
8
- - tag A
9
- - tag B
8
+ - 红
9
+ - 圆
10
10
  star: true
11
+ sticky: true
11
12
  ---
12
13
 
13
- # 文章 12
14
+ # 番茄
14
15
 
15
16
  ## 标题 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
 
@@ -0,0 +1,24 @@
1
+ import { defineUserConfig } from "vuepress";
2
+ import theme from "./theme.js";
3
+
4
+ export default defineUserConfig({
5
+ base: "/",
6
+
7
+ locales: {
8
+ "/": {
9
+ lang: "en-US",
10
+ title: "Docs Demo",
11
+ description: "A docs demo for vuepress-theme-hope",
12
+ },
13
+ "/zh/": {
14
+ lang: "zh-CN",
15
+ title: "文档演示",
16
+ description: "vuepress-theme-hope 的文档演示",
17
+ },
18
+ },
19
+
20
+ theme,
21
+
22
+ // Enable it with pwa
23
+ // shouldPrefetch: false,
24
+ });
@@ -0,0 +1,30 @@
1
+ import { navbar } from "vuepress-theme-hope";
2
+
3
+ export const enNavbar = navbar([
4
+ "/",
5
+ { text: "Demo", icon: "discover", link: "/demo/" },
6
+ {
7
+ text: "Guide",
8
+ icon: "creative",
9
+ prefix: "/guide/",
10
+ children: [
11
+ {
12
+ text: "Bar",
13
+ icon: "creative",
14
+ prefix: "bar/",
15
+ children: ["baz", { text: "...", icon: "more", link: "" }],
16
+ },
17
+ {
18
+ text: "Foo",
19
+ icon: "config",
20
+ prefix: "foo/",
21
+ children: ["ray", { text: "...", icon: "more", link: "" }],
22
+ },
23
+ ],
24
+ },
25
+ {
26
+ text: "V2 Docs",
27
+ icon: "note",
28
+ link: "https://theme-hope.vuejs.press/",
29
+ },
30
+ ]);
@@ -0,0 +1,2 @@
1
+ export * from "./en.js";
2
+ export * from "./zh.js";
@@ -0,0 +1,30 @@
1
+ import { navbar } from "vuepress-theme-hope";
2
+
3
+ export const zhNavbar = navbar([
4
+ "/zh/",
5
+ { text: "案例", icon: "discover", link: "/zh/demo/" },
6
+ {
7
+ text: "指南",
8
+ icon: "creative",
9
+ prefix: "/zh/guide/",
10
+ children: [
11
+ {
12
+ text: "Bar",
13
+ icon: "creative",
14
+ prefix: "bar/",
15
+ children: ["baz", { text: "...", icon: "more", link: "" }],
16
+ },
17
+ {
18
+ text: "Foo",
19
+ icon: "config",
20
+ prefix: "foo/",
21
+ children: ["ray", { text: "...", icon: "more", link: "" }],
22
+ },
23
+ ],
24
+ },
25
+ {
26
+ text: "V2 文档",
27
+ icon: "note",
28
+ link: "https://theme-hope.vuejs.press/zh/",
29
+ },
30
+ ]);
@@ -0,0 +1,21 @@
1
+ import { sidebar } from "vuepress-theme-hope";
2
+
3
+ export const enSidebar = sidebar({
4
+ "/": [
5
+ "",
6
+ {
7
+ icon: "discover",
8
+ text: "Demo",
9
+ prefix: "demo/",
10
+ link: "demo/",
11
+ children: "structure",
12
+ },
13
+ {
14
+ text: "Docs",
15
+ icon: "note",
16
+ prefix: "guide/",
17
+ children: "structure",
18
+ },
19
+ "slides",
20
+ ],
21
+ });
@@ -0,0 +1,2 @@
1
+ export * from "./en.js";
2
+ export * from "./zh.js";
@@ -0,0 +1,21 @@
1
+ import { sidebar } from "vuepress-theme-hope";
2
+
3
+ export const zhSidebar = sidebar({
4
+ "/zh/": [
5
+ "",
6
+ {
7
+ icon: "discover",
8
+ text: "案例",
9
+ prefix: "demo/",
10
+ link: "demo/",
11
+ children: "structure",
12
+ },
13
+ {
14
+ text: "文档",
15
+ icon: "note",
16
+ prefix: "guide/",
17
+ children: "structure",
18
+ },
19
+ "slides",
20
+ ],
21
+ });
@@ -0,0 +1,3 @@
1
+ // you can change config here
2
+ $colors: #c0392b, #d35400, #f39c12, #27ae60, #16a085, #2980b9, #8e44ad, #2c3e50,
3
+ #7f8c8d !default;
@@ -0,0 +1 @@
1
+ // place your custom styles here
@@ -0,0 +1,2 @@
1
+ // you can change colors here
2
+ $theme-color: #096dd9;
@@ -0,0 +1,172 @@
1
+ import { hopeTheme } from "vuepress-theme-hope";
2
+ import { enNavbar, zhNavbar } from "./navbar/index.js";
3
+ import { enSidebar, zhSidebar } from "./sidebar/index.js";
4
+
5
+ export default hopeTheme({
6
+ hostname: "https://vuepress-theme-hope-docs-demo.netlify.app",
7
+
8
+ author: {
9
+ name: "Mr.Hope",
10
+ url: "https://mrhope.site",
11
+ },
12
+
13
+ iconAssets: "iconfont",
14
+
15
+ logo: "/logo.svg",
16
+
17
+ repo: "vuepress-theme-hope/vuepress-theme-hope",
18
+
19
+ docsDir: "demo/theme-docs/src",
20
+
21
+ locales: {
22
+ "/": {
23
+ // navbar
24
+ navbar: enNavbar,
25
+
26
+ // sidebar
27
+ sidebar: enSidebar,
28
+
29
+ footer: "Default footer",
30
+
31
+ displayFooter: true,
32
+
33
+ metaLocales: {
34
+ editLink: "Edit this page on GitHub",
35
+ },
36
+ },
37
+
38
+ /**
39
+ * Chinese locale config
40
+ */
41
+ "/zh/": {
42
+ // navbar
43
+ navbar: zhNavbar,
44
+
45
+ // sidebar
46
+ sidebar: zhSidebar,
47
+
48
+ footer: "默认页脚",
49
+
50
+ displayFooter: true,
51
+
52
+ // page meta
53
+ metaLocales: {
54
+ editLink: "在 GitHub 上编辑此页",
55
+ },
56
+ },
57
+ },
58
+
59
+ encrypt: {
60
+ config: {
61
+ "/demo/encrypt.html": ["1234"],
62
+ "/zh/demo/encrypt.html": ["1234"],
63
+ },
64
+ },
65
+
66
+ plugins: {
67
+ comment: {
68
+ // @ts-expect-error: You should generate and use your own comment service
69
+ provider: "Waline",
70
+ },
71
+
72
+ // all features are enabled for demo, only preserve features you need here
73
+ mdEnhance: {
74
+ align: true,
75
+ attrs: true,
76
+ chart: true,
77
+ codetabs: true,
78
+ demo: true,
79
+ echarts: true,
80
+ figure: true,
81
+ flowchart: true,
82
+ gfm: true,
83
+ imgLazyload: true,
84
+ imgSize: true,
85
+ include: true,
86
+ katex: true,
87
+ mark: true,
88
+ mermaid: true,
89
+ playground: {
90
+ presets: ["ts", "vue"],
91
+ },
92
+ presentation: {
93
+ plugins: ["highlight", "math", "search", "notes", "zoom"],
94
+ },
95
+ stylize: [
96
+ {
97
+ matcher: "Recommended",
98
+ replacer: ({ tag }) => {
99
+ if (tag === "em")
100
+ return {
101
+ tag: "Badge",
102
+ attrs: { type: "tip" },
103
+ content: "Recommended",
104
+ };
105
+ },
106
+ },
107
+ ],
108
+ sub: true,
109
+ sup: true,
110
+ tabs: true,
111
+ vPre: true,
112
+ vuePlayground: true,
113
+ },
114
+
115
+ // uncomment these if you want a pwa
116
+ // pwa: {
117
+ // favicon: "/favicon.ico",
118
+ // cacheHTML: true,
119
+ // cachePic: true,
120
+ // appendBase: true,
121
+ // apple: {
122
+ // icon: "/assets/icon/apple-icon-152.png",
123
+ // statusBarColor: "black",
124
+ // },
125
+ // msTile: {
126
+ // image: "/assets/icon/ms-icon-144.png",
127
+ // color: "#ffffff",
128
+ // },
129
+ // manifest: {
130
+ // icons: [
131
+ // {
132
+ // src: "/assets/icon/chrome-mask-512.png",
133
+ // sizes: "512x512",
134
+ // purpose: "maskable",
135
+ // type: "image/png",
136
+ // },
137
+ // {
138
+ // src: "/assets/icon/chrome-mask-192.png",
139
+ // sizes: "192x192",
140
+ // purpose: "maskable",
141
+ // type: "image/png",
142
+ // },
143
+ // {
144
+ // src: "/assets/icon/chrome-512.png",
145
+ // sizes: "512x512",
146
+ // type: "image/png",
147
+ // },
148
+ // {
149
+ // src: "/assets/icon/chrome-192.png",
150
+ // sizes: "192x192",
151
+ // type: "image/png",
152
+ // },
153
+ // ],
154
+ // shortcuts: [
155
+ // {
156
+ // name: "Demo",
157
+ // short_name: "Demo",
158
+ // url: "/demo/",
159
+ // icons: [
160
+ // {
161
+ // src: "/assets/icon/guide-maskable.png",
162
+ // sizes: "192x192",
163
+ // purpose: "maskable",
164
+ // type: "image/png",
165
+ // },
166
+ // ],
167
+ // },
168
+ // ],
169
+ // },
170
+ // },
171
+ },
172
+ });