fix: 修复目录解析问题

This commit is contained in:
pengzhanbo 2022-03-14 02:10:38 +08:00
parent 5534b96d7a
commit 472ee9bd0c
3 changed files with 3 additions and 3 deletions

View File

@ -1,6 +1,6 @@
{
"name": "@pengzhanbo/vuepress-theme-plume",
"version": "1.0.0-beta.5",
"version": "1.0.0-beta.6",
"description": "blog theme by vuepress2.x",
"main": "lib/node/index.js",
"types": "lib/node/index.d.ts",

View File

@ -19,7 +19,7 @@ yarn add @pengzhanbo/vuepress-theme-plume
// or {sourceDir}/.vuepress/config.{js, ts}
export default {
// ...
theme: path.resolve(__dirname, './lib/node/index.js'),
theme: '@pengzhanbo/vuepress-theme-plume',
themeConfig: {
// 首页头部大图
bannerImg: '/big-banner.jpg',

View File

@ -10,7 +10,7 @@ export const extendsPage = (page: Page<PlumeThemePageData>): void => {
?.split('/')
.slice(0, -1)
.map((category) => {
const match = category.match(/^(\d+?)?(?:\.?)([^]+)$/) || []
const match = category.match(/^(\d+)?(?:\.?)([^]+)$/) || []
return {
type: Number(match[1]) || uuid++,
name: match[2],