Skip to content

Commit

Permalink
feat: v1.12.5
Browse files Browse the repository at this point in the history
  • Loading branch information
xugaoyi committed Jul 8, 2022
1 parent 1ac26b3 commit 07f93f1
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"vuepress-plugin-one-click-copy": "^1.0.2",
"vuepress-plugin-thirdparty-search": "^1.0.2",
"vuepress-plugin-zooming": "^1.1.7",
"vuepress-theme-vdoing": "^1.12.4",
"vuepress-theme-vdoing": "^1.12.5",
"yamljs": "^0.3.0"
}
}
11 changes: 10 additions & 1 deletion vdoing/node_utils/setFrontmatter.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,16 @@ function getCategories(file, categoryText) {
}
}
} 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
}
Expand Down
2 changes: 1 addition & 1 deletion vdoing/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vuepress-theme-vdoing",
"version": "1.12.4",
"version": "1.12.5",
"description": "Vdoing theme for VuePress. 一个基于VuePress的知识管理兼博客主题。",
"author": {
"name": "gaoyi(Evan) Xu"
Expand Down

1 comment on commit 07f93f1

@vercel
Copy link

@vercel vercel bot commented on 07f93f1 Jul 8, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.