Skip to content

Commit 07f93f1

Browse files
committed
feat: v1.12.5
1 parent 1ac26b3 commit 07f93f1

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"vuepress-plugin-one-click-copy": "^1.0.2",
2525
"vuepress-plugin-thirdparty-search": "^1.0.2",
2626
"vuepress-plugin-zooming": "^1.1.7",
27-
"vuepress-theme-vdoing": "^1.12.4",
27+
"vuepress-theme-vdoing": "^1.12.5",
2828
"yamljs": "^0.3.0"
2929
}
3030
}

vdoing/node_utils/setFrontmatter.js

+10-1
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,16 @@ function getCategories(file, categoryText) {
143143
}
144144
}
145145
} else {
146-
categories.push(categoryText)
146+
// 碎片化文章的分类生成
147+
const matchResult = file.filePath.match(/_posts\/(\S*)\//);
148+
const resultStr = matchResult ? matchResult[1] : ''
149+
const resultArr = resultStr.split('/').filter(Boolean)
150+
151+
if (resultArr.length) {
152+
categories.push(...resultArr)
153+
} else {
154+
categories.push(categoryText)
155+
}
147156
}
148157
return categories
149158
}

vdoing/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vuepress-theme-vdoing",
3-
"version": "1.12.4",
3+
"version": "1.12.5",
44
"description": "Vdoing theme for VuePress. 一个基于VuePress的知识管理兼博客主题。",
55
"author": {
66
"name": "gaoyi(Evan) Xu"

0 commit comments

Comments
 (0)