@sugarat/create-theme 0.0.14 → 0.0.16

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.
@@ -71,6 +71,8 @@ npm i -g pnpm
71
71
  pnpm dev
72
72
  ```
73
73
 
74
+ ![](https://img.cdn.sugarat.top/mdImg/MTY5NTIxODUyMDU4MQ==695218520581)
75
+
74
76
  你就会得到一个这样的页面
75
77
 
76
78
  ![](https://img.cdn.sugarat.top/mdImg/MTY3Njk4OTk2Mjc0Nw==676989962747)
@@ -79,17 +81,35 @@ pnpm dev
79
81
  ```sh
80
82
  pnpm build
81
83
  ```
84
+ ![](https://img.cdn.sugarat.top/mdImg/MTY5NTIxODYwNzA3Nw==695218607077)
85
+
86
+ 默认会开启内置的离线全文搜索(基于 `pagefind` 实现)
87
+
88
+ 如果不需要可以在 `docs/.vitepress/blog-theme.ts` 中关闭
89
+ * 如果`npx pagefind` 时间过长,可以手动将其安装为项目依赖 `pnpm add pagefind`
90
+ ```ts
91
+ const blogTheme = getThemeConfig({
92
+ // 默认开启pagefind离线的全文搜索支持(如使用其它的可以设置为false)
93
+ // 如果npx pagefind 时间过长,可以手动将其安装为项目依赖 pnpm add pagefind
94
+ search: false,
95
+ });
96
+ ```
82
97
 
83
98
  ⑤ 预览构建产物
84
99
  ```sh
85
100
  pnpm serve
86
101
  ```
87
102
 
103
+ ![](https://img.cdn.sugarat.top/mdImg/MTY5NTIxODY1NzAzNg==695218657036)
104
+
88
105
  ## 升级
89
106
 
90
107
  如果主题更新了,升级主题,原项目只需执行如下指令即可
91
108
  ```sh
92
109
  pnpm up @sugarat/theme
110
+
111
+ # 更新 vitepress 版本(通常安装最新的即可,主题包每次更新不出意外都会使用最新的VitePress)
112
+ pnpm add vitepress@latest
93
113
  ```
94
114
 
95
115
  ## 更多
@@ -9,7 +9,7 @@
9
9
  },
10
10
  "dependencies": {
11
11
  "@element-plus/icons-vue": "^2.1.0",
12
- "@sugarat/theme": "^0.1.47",
12
+ "@sugarat/theme": "^0.1.49",
13
13
  "element-plus": "^2.3.8",
14
14
  "vue": "^3.3.4"
15
15
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sugarat/create-theme",
3
- "version": "0.0.14",
3
+ "version": "0.0.16",
4
4
  "description": "简约风的 Vitepress 博客主题,sugarat vitepress blog theme",
5
5
  "bin": {
6
6
  "create-theme": "./dist/index.js"