diff --git a/package.json b/package.json index edb55fd..9af13f7 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,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.8.2", + "vuepress-theme-vdoing": "^1.8.3", "yamljs": "^0.3.0" }, "dependencies": { diff --git a/theme-vdoing/components/Catalogue.vue b/theme-vdoing/components/Catalogue.vue index e54eadc..7db4e4a 100644 --- a/theme-vdoing/components/Catalogue.vue +++ b/theme-vdoing/components/Catalogue.vue @@ -90,7 +90,8 @@ export default { }, getCatalogueList () { const { sidebar } = this.$site.themeConfig - const key = this.$frontmatter.pageComponent.data.key + const { data } = this.$frontmatter.pageComponent + const key = data.path || data.key let keyArray = key.split('/'); let catalogueList = (sidebar[`/${keyArray[0]}/`]); if (keyArray.length > 1) { diff --git a/theme-vdoing/package.json b/theme-vdoing/package.json index 39b3904..c813d8a 100644 --- a/theme-vdoing/package.json +++ b/theme-vdoing/package.json @@ -1,6 +1,6 @@ { "name": "vuepress-theme-vdoing", - "version": "1.8.2", + "version": "1.8.3", "description": "Vdoing theme for VuePress. 一个基于VuePress的知识管理兼博客主题。", "author": { "name": "gaoyi(Evan) Xu"