feat: v1.12.5

This commit is contained in:
xugaoyi 2022-07-08 10:34:32 +08:00
parent 1ac26b3189
commit 07f93f17b1
3 changed files with 12 additions and 3 deletions

View File

@ -24,7 +24,7 @@
"vuepress-plugin-one-click-copy": "^1.0.2", "vuepress-plugin-one-click-copy": "^1.0.2",
"vuepress-plugin-thirdparty-search": "^1.0.2", "vuepress-plugin-thirdparty-search": "^1.0.2",
"vuepress-plugin-zooming": "^1.1.7", "vuepress-plugin-zooming": "^1.1.7",
"vuepress-theme-vdoing": "^1.12.4", "vuepress-theme-vdoing": "^1.12.5",
"yamljs": "^0.3.0" "yamljs": "^0.3.0"
} }
} }

View File

@ -143,7 +143,16 @@ function getCategories(file, categoryText) {
} }
} }
} else { } else {
categories.push(categoryText) // 碎片化文章的分类生成
const matchResult = file.filePath.match(/_posts\/(\S*)\//);
const resultStr = matchResult ? matchResult[1] : ''
const resultArr = resultStr.split('/').filter(Boolean)
if (resultArr.length) {
categories.push(...resultArr)
} else {
categories.push(categoryText)
}
} }
return categories return categories
} }

View File

@ -1,6 +1,6 @@
{ {
"name": "vuepress-theme-vdoing", "name": "vuepress-theme-vdoing",
"version": "1.12.4", "version": "1.12.5",
"description": "Vdoing theme for VuePress. 一个基于VuePress的知识管理兼博客主题。", "description": "Vdoing theme for VuePress. 一个基于VuePress的知识管理兼博客主题。",
"author": { "author": {
"name": "gaoyi(Evan) Xu" "name": "gaoyi(Evan) Xu"