@sugarat/create-theme 0.0.91-beta.0 → 0.0.91-beta.1
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/README.md +1 -1
- package/dist/template/README.md +1 -1
- package/dist/template/docs/.vitepress/blog-theme.ts +1 -1
- package/dist/template/docs/about.md +1 -1
- package/dist/template/docs/sop/component.md +73 -5
- package/dist/template/docs/sop/quickStart.md +5 -5
- package/dist/template/docs/sop/style.md +4 -4
- package/dist/template/package.json +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# @sugarat/create-theme
|
|
2
2
|
快速创建简约风的 Vitepress 博客主题项目模板,更多细节见 https://theme.sugarat.top
|
|
3
3
|
|
|
4
|
-

|
|
4
|
+

|
|
5
5
|
|
|
6
6
|
## Scaffolding Your First Blog Project
|
|
7
7
|
|
package/dist/template/README.md
CHANGED
|
@@ -44,7 +44,7 @@ pnpm serve
|
|
|
44
44
|
|
|
45
45
|
① Github Pages 开启 Git Actions 部署支持
|
|
46
46
|
|
|
47
|
-

|
|
47
|
+

|
|
48
48
|
|
|
49
49
|
② 复制文件 `.github/workflows/deploy.yml` 到自己的项目相同目录下
|
|
50
50
|
|
|
@@ -54,7 +54,7 @@ const blogTheme = getThemeConfig({
|
|
|
54
54
|
nickname: '粥里有勺糖',
|
|
55
55
|
des: '你的指尖用于改变世界的力量',
|
|
56
56
|
avatar:
|
|
57
|
-
'https://img.cdn.sugarat.top/mdImg/MTY3NDk5NTE2NzAzMA==674995167030',
|
|
57
|
+
'https://img.cdn.sugarat.top/mdImg/MTY3NDk5NTE2NzAzMA==674995167030~fmt.webp',
|
|
58
58
|
url: 'https://sugarat.top',
|
|
59
59
|
},
|
|
60
60
|
{
|
|
@@ -5,7 +5,7 @@ sticky: 1
|
|
|
5
5
|
|
|
6
6
|
简约风的 Vitepress 博客主题,基于 [vitepress](https://vitepress.dev/) 的自定义主题实现
|
|
7
7
|
|
|
8
|
-

|
|
8
|
+

|
|
9
9
|
|
|
10
10
|
更多细节见 https://theme.sugarat.top
|
|
11
11
|
|
|
@@ -2,9 +2,59 @@
|
|
|
2
2
|
description: 默认支持流程图,tabs面板,待办列表,作品页面
|
|
3
3
|
---
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## groupIcon - 分组代码块图标
|
|
6
|
+
作用于 `code-group` 代码块,提供语言/工具图标,基于 [vitepress-plugin-group-icons](https://github.com/yuyinws/vitepress-plugin-group-icons/tree/main/docs) 插件实现。
|
|
6
7
|
|
|
7
|
-
|
|
8
|
+

|
|
9
|
+
|
|
10
|
+
:::code-group
|
|
11
|
+
```sh [npm]
|
|
12
|
+
npm create @sugarat/theme@latest
|
|
13
|
+
```
|
|
14
|
+
```sh [yarn]
|
|
15
|
+
yarn create @sugarat/theme
|
|
16
|
+
```
|
|
17
|
+
```sh [pnpm]
|
|
18
|
+
pnpm create @sugarat/theme
|
|
19
|
+
```
|
|
20
|
+
```sh [bun]
|
|
21
|
+
bun create @sugarat/theme
|
|
22
|
+
```
|
|
23
|
+
:::
|
|
24
|
+
|
|
25
|
+
````md
|
|
26
|
+
:::code-group
|
|
27
|
+
```sh [npm]
|
|
28
|
+
npm create @sugarat/theme@latest
|
|
29
|
+
```
|
|
30
|
+
```sh [yarn]
|
|
31
|
+
yarn create @sugarat/theme
|
|
32
|
+
```
|
|
33
|
+
```sh [pnpm]
|
|
34
|
+
pnpm create @sugarat/theme
|
|
35
|
+
```
|
|
36
|
+
```sh [bun]
|
|
37
|
+
bun create @sugarat/theme
|
|
38
|
+
```
|
|
39
|
+
:::
|
|
40
|
+
````
|
|
41
|
+
|
|
42
|
+
```ts
|
|
43
|
+
const blogTheme = getThemeConfig({
|
|
44
|
+
// 自定义图标
|
|
45
|
+
groupIcon: {
|
|
46
|
+
|
|
47
|
+
}
|
|
48
|
+
})
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
也可以关闭这个功能
|
|
52
|
+
|
|
53
|
+
```ts
|
|
54
|
+
const blogTheme = getThemeConfig({
|
|
55
|
+
groupIcon: false
|
|
56
|
+
})
|
|
57
|
+
```
|
|
8
58
|
|
|
9
59
|
## oml2d - 看板娘集成
|
|
10
60
|
* Type:[oml2dOptions](https://oml2d.hacxy.cn/api/interfaces/Options.html)
|
|
@@ -14,7 +64,7 @@ description: 默认支持流程图,tabs面板,待办列表,作品页面
|
|
|
14
64
|
:::tip 一点说明
|
|
15
65
|
通过内置 [oh-my-live2d](https://oml2d.hacxy.cn) 实现, 可以通过 `oml2d` 选项配置。
|
|
16
66
|
|
|
17
|
-
通过这个能力可以快速加入并定制属于自己的看板娘, 开启只需要为其传递一个 [配置选项](https://oml2d.hacxy.cn/
|
|
67
|
+
通过这个能力可以快速加入并定制属于自己的看板娘, 开启只需要为其传递一个 [配置选项](https://oml2d.hacxy.cn/api/interfaces/Options.html) 即可
|
|
18
68
|
:::
|
|
19
69
|
|
|
20
70
|
以下是一个简单的使用示例,当模型加载成功时它将出现在您网站的左下角。
|
|
@@ -49,7 +99,6 @@ const blogTheme = getThemeConfig({
|
|
|
49
99
|
}
|
|
50
100
|
```
|
|
51
101
|
:::
|
|
52
|
-
|
|
53
102
|
## task-checkbox
|
|
54
103
|
* Type: `boolean | TaskCheckbox`
|
|
55
104
|
|
|
@@ -297,6 +346,25 @@ gantt
|
|
|
297
346
|
Parallel 4 : des6, after des4, 1d
|
|
298
347
|
```
|
|
299
348
|
|
|
349
|
+
## 数学公式
|
|
350
|
+
|
|
351
|
+
$a \ne 0$
|
|
352
|
+
|
|
353
|
+
$$\text{Attention}(Q, K, V) = \text{softmax}\left(\frac{QK^\top}{\sqrt{d}}\right)V$$
|
|
354
|
+
|
|
355
|
+
VitePress 官方提供了内置支持,安装相关依赖,配置开启即可。
|
|
356
|
+
|
|
357
|
+
```sh
|
|
358
|
+
npm add -D markdown-it-mathjax3@^4
|
|
359
|
+
```
|
|
360
|
+
|
|
361
|
+
```ts [.vitepress/config.mts]
|
|
362
|
+
export default {
|
|
363
|
+
markdown: {
|
|
364
|
+
math: true
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
```
|
|
300
368
|
|
|
301
369
|
## UserWorksPage
|
|
302
370
|
* Type: `UserWorks`
|
|
@@ -305,7 +373,7 @@ gantt
|
|
|
305
373
|
|
|
306
374
|
效果如下,详见 [个人作品展示](https://theme.sugarat.top/work.html)
|
|
307
375
|
|
|
308
|
-

|
|
376
|
+

|
|
309
377
|
|
|
310
378
|
新建一个`works.md`文件,放入以下内容
|
|
311
379
|
|
|
@@ -82,7 +82,7 @@ bun create @sugarat/theme my-first-blog
|
|
|
82
82
|
|
|
83
83
|
| npm/yarn/pnpm | bun |
|
|
84
84
|
| :---------------------------------------------------------------------: | :---------------------------------------------------------------------: |
|
|
85
|
-
|  |  |
|
|
85
|
+
|  |  |
|
|
86
86
|
|
|
87
87
|
|
|
88
88
|
① 切换到项目的目录
|
|
@@ -113,11 +113,11 @@ bun run --bun dev
|
|
|
113
113
|
:::
|
|
114
114
|
|
|
115
115
|
|
|
116
|
-

|
|
116
|
+

|
|
117
117
|
|
|
118
118
|
你就会得到一个这样的页面
|
|
119
119
|
|
|
120
|
-

|
|
120
|
+

|
|
121
121
|
|
|
122
122
|
④ 构建产物
|
|
123
123
|
:::code-group
|
|
@@ -129,7 +129,7 @@ bun run --bun build
|
|
|
129
129
|
```
|
|
130
130
|
:::
|
|
131
131
|
|
|
132
|
-

|
|
132
|
+

|
|
133
133
|
|
|
134
134
|
默认会开启内置的离线全文搜索(基于 `pagefind` 实现)
|
|
135
135
|
|
|
@@ -154,7 +154,7 @@ bun run --bun serve
|
|
|
154
154
|
```
|
|
155
155
|
:::
|
|
156
156
|
|
|
157
|
-

|
|
157
|
+

|
|
158
158
|
|
|
159
159
|
## 升级
|
|
160
160
|
|
|
@@ -41,7 +41,7 @@ export default BlogTheme
|
|
|
41
41
|
```
|
|
42
42
|
解除文件`index.ts` 中`import './style.css'` 注释后,就能看到模板首页背景图发生了变化
|
|
43
43
|
|
|
44
|
-

|
|
44
|
+

|
|
45
45
|
|
|
46
46
|
## 首页背景
|
|
47
47
|
```css
|
|
@@ -69,7 +69,7 @@ export default BlogTheme
|
|
|
69
69
|
background-image: linear-gradient(red, red);
|
|
70
70
|
}
|
|
71
71
|
```
|
|
72
|
-

|
|
72
|
+

|
|
73
73
|
|
|
74
74
|
```css
|
|
75
75
|
/* 隐藏置顶的icon */
|
|
@@ -77,13 +77,13 @@ export default BlogTheme
|
|
|
77
77
|
display: none;
|
|
78
78
|
}
|
|
79
79
|
```
|
|
80
|
-

|
|
80
|
+

|
|
81
81
|
|
|
82
82
|
|
|
83
83
|
## 主题色
|
|
84
84
|
vitepress 最新的默认主题色偏紫色,看着感觉有点不习惯
|
|
85
85
|
|
|
86
|
-

|
|
86
|
+

|
|
87
87
|
|
|
88
88
|
主题包内置了一些主题色,可以自行选择,详见[全局配置:themeColor](https://theme.sugarat.top/config/global.html#themecolor)
|
|
89
89
|
|