@sugarat/theme 0.2.21 → 0.2.22
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/node.js +7 -1
- package/package.json +3 -3
- package/src/utils/node/vitePlugins.ts +7 -1
package/node.js
CHANGED
|
@@ -473,7 +473,13 @@ function getVitePlugins(cfg) {
|
|
|
473
473
|
if (cfg && cfg.search !== false) {
|
|
474
474
|
const ops = cfg.search instanceof Object ? cfg.search : {};
|
|
475
475
|
plugins.push(
|
|
476
|
-
(0, import_vitepress_plugin_pagefind.pagefindPlugin)({
|
|
476
|
+
(0, import_vitepress_plugin_pagefind.pagefindPlugin)({
|
|
477
|
+
...ops,
|
|
478
|
+
customSearchQuery: import_vitepress_plugin_pagefind.chineseSearchOptimize,
|
|
479
|
+
filter(searchItem) {
|
|
480
|
+
return searchItem.meta.publish !== false;
|
|
481
|
+
}
|
|
482
|
+
})
|
|
477
483
|
);
|
|
478
484
|
}
|
|
479
485
|
if (cfg?.mermaid !== false) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sugarat/theme",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.22",
|
|
4
4
|
"description": "简约风的 Vitepress 博客主题,sugarat vitepress blog theme",
|
|
5
5
|
"author": "sugar",
|
|
6
6
|
"license": "MIT",
|
|
@@ -45,8 +45,8 @@
|
|
|
45
45
|
"swiper": "^11.0.5",
|
|
46
46
|
"vitepress-markdown-timeline": "^1.2.1",
|
|
47
47
|
"vitepress-plugin-mermaid": "2.0.13",
|
|
48
|
-
"vitepress-plugin-pagefind": "0.2.
|
|
49
|
-
"vitepress-plugin-rss": "0.2.
|
|
48
|
+
"vitepress-plugin-pagefind": "0.2.12",
|
|
49
|
+
"vitepress-plugin-rss": "0.2.2",
|
|
50
50
|
"vitepress-plugin-tabs": "0.2.0"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
@@ -27,7 +27,13 @@ export function getVitePlugins(cfg?: Partial<Theme.BlogConfig>) {
|
|
|
27
27
|
if (cfg && cfg.search !== false) {
|
|
28
28
|
const ops = cfg.search instanceof Object ? cfg.search : {}
|
|
29
29
|
plugins.push(
|
|
30
|
-
pagefindPlugin({
|
|
30
|
+
pagefindPlugin({
|
|
31
|
+
...ops,
|
|
32
|
+
customSearchQuery: chineseSearchOptimize,
|
|
33
|
+
filter(searchItem) {
|
|
34
|
+
return searchItem.meta.publish !== false
|
|
35
|
+
}
|
|
36
|
+
})
|
|
31
37
|
)
|
|
32
38
|
}
|
|
33
39
|
|