@sugarat/create-theme 0.0.61 → 0.0.63

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.
@@ -52,6 +52,8 @@ pnpm serve
52
52
 
53
53
  ③ 修改 `docs/.vitepress/config.mts` 里的构建配置
54
54
 
55
+ **如果项目名已经为 name.github.io 域名,则不需要修改,保持默认值 `/` 即可**
56
+
55
57
  `base` 改为 `"/仓库名/"` 即可
56
58
 
57
59
  ```ts
@@ -22,9 +22,11 @@ const blogTheme = getThemeConfig({
22
22
 
23
23
  // 搜索
24
24
  // 默认开启pagefind离线的全文搜索支持(如使用其它的可以设置为false)
25
- // 如果npx pagefind 时间过长,可以手动将其安装为项目依赖 pnpm add pagefind
26
25
  // search: false,
27
26
 
27
+ // markdown 图表支持(会增加一定的构建耗时)
28
+ // mermaid: true
29
+
28
30
  // 页脚
29
31
  footer: {
30
32
  // message 字段支持配置为HTML内容,配置多条可以配置为数组
@@ -5,6 +5,7 @@ import { blogTheme } from './blog-theme'
5
5
 
6
6
  // 如果使用 GitHub/Gitee Pages 等公共平台部署
7
7
  // 通常需要修改 base 路径,通常为“/仓库名/”
8
+ // 如果项目名已经为 name.github.io 域名,则不需要修改!
8
9
  // const base = process.env.GITHUB_ACTIONS === 'true'
9
10
  // ? '/vitepress-blog-sugar-template/'
10
11
  // : '/'
@@ -3,6 +3,53 @@ description: 默认支持流程图,tabs面板,待办列表,作品页面
3
3
  ---
4
4
 
5
5
  # 内置第三方插件能力
6
+
7
+ 部分内置组件(插件),来源 [vitepress.yiov.top](https://vitepress.yiov.top/plugin.html) 推荐
8
+
9
+ ## oml2d - 看板娘集成
10
+ * Type:[oml2dOptions](https://oml2d.com/options/Options.html)
11
+
12
+ 为网站提供一个 Live2D 看板组件。
13
+
14
+ :::tip 一点说明
15
+ 通过内置 [oh-my-live2d](https://oml2d.com) 实现, 可以通过 `oml2d` 选项配置。
16
+
17
+ 通过这个能力可以快速加入并定制属于自己的看板娘, 开启只需要为其传递一个 [配置选项](https://oml2d.com/options/Options.html) 即可
18
+ :::
19
+
20
+ 以下是一个简单的使用示例,当模型加载成功时它将出现在您网站的左下角。
21
+
22
+ ```ts
23
+ const blogTheme = getThemeConfig({
24
+ oml2d: {
25
+ mobileDisplay: true,
26
+ models: [
27
+ {
28
+ path: 'https://registry.npmmirror.com/oml2d-models/latest/files/models/Senko_Normals/senko.model3.json'
29
+ }
30
+ ]
31
+ }
32
+ })
33
+ ```
34
+ 效果图如下
35
+
36
+ ![](https://loclink-1259720482.cos.ap-beijing.myqcloud.com/image/%E5%BD%95%E5%B1%8F2024-03-11%2023.51.51.gif)
37
+
38
+ 之后您还可以前往[配置选项](https://oml2d.com/options/Options.html)查阅更多自定义内容
39
+
40
+ :::tip 版本说明
41
+ 由于时间原因,主题内置的版本不一定都是最新的,可以通过 `resolutions` 配置指定要使用的版本。
42
+
43
+ 下面是使用示例,配置在 `package.json` 中,其它依赖覆盖版本也是这样操作。
44
+ ```json
45
+ {
46
+ "resolutions": {
47
+ "oh-my-live2d": "^0.17.0"
48
+ }
49
+ }
50
+ ```
51
+ :::
52
+
6
53
  ## task-checkbox
7
54
  * Type: `boolean | TaskCheckbox`
8
55
 
@@ -46,8 +93,48 @@ interface TaskCheckbox {
46
93
  ```
47
94
  :::
48
95
 
96
+ ## timeline
97
+ * Type: `boolean`
98
+ * default: `true`
99
+
100
+ 提供 markdown 时间线语法,在 vitepress 中使用 markdown 渲染时间线(时间轴)样式。
49
101
 
102
+ :::tip 一点说明
103
+ 内置 [vitepress-markdown-timeline](https://github.com/HanochMa/vitepress-markdown-timeline) 实现
104
+ :::
105
+
106
+ 效果如下
50
107
 
108
+ ::: timeline 2023-05-24
109
+ - **do some thing1**
110
+ - do some thing2
111
+ :::
112
+
113
+ ::: timeline 2023-05-23
114
+ do some thing3
115
+ do some thing4
116
+ :::
117
+
118
+ 语法如下
119
+ ```md
120
+ ::: timeline 2023-05-24
121
+ - **do some thing1**
122
+ - do some thing2
123
+ :::
124
+
125
+ ::: timeline 2023-05-23
126
+ do some thing3
127
+ do some thing4
128
+ :::
129
+ ```
130
+
131
+ :::code-group
132
+ ```ts [关闭]
133
+ const blogTheme = getThemeConfig({
134
+ timeline: false
135
+ })
136
+ ```
137
+ :::
51
138
  ## tabs
52
139
  * Type: `boolean`
53
140
 
@@ -166,12 +253,12 @@ flowchart TD
166
253
  Start --> Stop
167
254
  ```
168
255
 
169
- **默认开启**,可以通过`mermaid`进行进一步配置,或关闭
256
+ **默认关闭**,可以通过设置 `mermaid: true` 开启,或进行进一步配置。
170
257
 
171
258
  :::code-group
172
- ```ts [① 关闭]
259
+ ```ts [① 开启]
173
260
  const blogTheme = getThemeConfig({
174
- mermaid: false
261
+ mermaid: true
175
262
  })
176
263
  ```
177
264
  ```ts [② 进一步配置]
@@ -210,12 +297,13 @@ gantt
210
297
  Parallel 4 : des6, after des4, 1d
211
298
  ```
212
299
 
300
+
213
301
  ## UserWorksPage
214
302
  * Type: `UserWorks`
215
303
 
216
304
  用于作品列表展示
217
305
 
218
- 效果如下,详见 [个人作品展示](https://theme.sugarat.top/work.html)
306
+ 效果如下,详见 [个人作品展示](./../work.md)
219
307
 
220
308
  ![](https://img.cdn.sugarat.top/mdImg/MTY4NzA4ODczMzkwNg==687088733906)
221
309
 
@@ -11,7 +11,7 @@
11
11
  },
12
12
  "dependencies": {
13
13
  "@element-plus/icons-vue": "^2.3.1",
14
- "@sugarat/theme": "^0.3.6",
14
+ "@sugarat/theme": "^0.4.1",
15
15
  "element-plus": "^2.7.2",
16
16
  "vue": "3.4.26"
17
17
  },
@@ -22,7 +22,7 @@
22
22
  "pagefind": "^1.1.0",
23
23
  "sass": "^1.76.0",
24
24
  "typescript": "^5.4.5",
25
- "vitepress": "1.2.2"
25
+ "vitepress": "1.2.3"
26
26
  },
27
27
  "pnpm": {
28
28
  "peerDependencyRules": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sugarat/create-theme",
3
- "version": "0.0.61",
3
+ "version": "0.0.63",
4
4
  "description": "简约风的 Vitepress 博客主题,sugarat vitepress blog theme",
5
5
  "author": "粥里有勺糖",
6
6
  "license": "MIT",