@sugarat/create-theme 0.0.38 → 0.0.40

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.
@@ -12,13 +12,23 @@ export default defineConfig({
12
12
  title: '@sugarat/theme',
13
13
  description: '粥里有勺糖的博客主题,基于 vitepress 实现',
14
14
  lastUpdated: true,
15
- // 详见:https://vitepress.dev/reference/site-config#head
15
+ // 详见:https://vitepress.dev/zh/reference/site-config#head
16
16
  head: [
17
17
  // 配置网站的图标(显示在浏览器的 tab 上)
18
18
  ['link', { rel: 'icon', href: '/favicon.ico' }]
19
19
  ],
20
20
  themeConfig: {
21
+ // 展示 2,3 级标题在目录中
22
+ outline: {
23
+ level: [2, 3],
24
+ label: '目录'
25
+ },
26
+ // 默认文案修改
27
+ returnToTopLabel: '回到顶部',
28
+ sidebarMenuLabel: '相关文章',
21
29
  lastUpdatedText: '上次更新于',
30
+
31
+ // 设置logo
22
32
  logo: '/logo.png',
23
33
  // editLink: {
24
34
  // pattern:
@@ -1,8 +1,52 @@
1
1
  ---
2
- description: 默认支持流程图,tabs面板
2
+ description: 默认支持流程图,tabs面板,待办列表,作品页面
3
3
  ---
4
4
 
5
5
  # 内置第三方插件能力
6
+ ## task-checkbox
7
+ * Type: `boolean | TaskCheckbox`
8
+
9
+ 支持渲染 markdown 任务列表,内置 [markdown-it-task-checkbox](https://github.com/linsir/markdown-it-task-checkbox) 插件提供支持
10
+
11
+ * [ ] 🥔 TODO
12
+ * [ ] 真不戳
13
+ * [x] 内置任务列表
14
+
15
+ 语法如下
16
+ ```md
17
+ * [ ] 🥔 TODO
18
+ * [ ] 真不戳
19
+ * [x] 内置任务列表
20
+ ```
21
+
22
+ 默认开启,你可以进一步配置
23
+
24
+ :::code-group
25
+ ```ts [① 关闭]
26
+ const blogTheme = getThemeConfig({
27
+ taskCheckbox: false
28
+ })
29
+ ```
30
+ ```ts [② 进一步配置]
31
+ const blogTheme = getThemeConfig({
32
+ taskCheckbox: {
33
+ // refer https://github.com/linsir/markdown-it-task-checkbox for options
34
+ }
35
+ })
36
+ ```
37
+ ```ts [③ type]
38
+ interface TaskCheckbox {
39
+ disabled?: boolean
40
+ divWrap?: boolean
41
+ divClass?: string
42
+ idPrefix?: string
43
+ ulClass?: string
44
+ liClass?: string
45
+ }
46
+ ```
47
+ :::
48
+
49
+
6
50
 
7
51
  ## tabs
8
52
  * Type: `boolean`
@@ -10,10 +10,10 @@
10
10
  "serve": "vitepress serve docs"
11
11
  },
12
12
  "dependencies": {
13
- "@element-plus/icons-vue": "^2.1.0",
14
- "@sugarat/theme": "^0.2.16",
15
- "element-plus": "^2.3.8",
16
- "vue": "3.3.13"
13
+ "@element-plus/icons-vue": "^2.3.1",
14
+ "@sugarat/theme": "^0.2.18",
15
+ "element-plus": "^2.5.3",
16
+ "vue": "3.4.15"
17
17
  },
18
18
  "directories": {
19
19
  "doc": "docs"
@@ -21,6 +21,6 @@
21
21
  "devDependencies": {
22
22
  "sass": "^1.64.1",
23
23
  "typescript": "^5.1.6",
24
- "vitepress": "1.0.0-rc.36"
24
+ "vitepress": "1.0.0-rc.40"
25
25
  }
26
26
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sugarat/create-theme",
3
- "version": "0.0.38",
3
+ "version": "0.0.40",
4
4
  "description": "简约风的 Vitepress 博客主题,sugarat vitepress blog theme",
5
5
  "author": "粥里有勺糖",
6
6
  "license": "MIT",