From 573e23702811e375a4baf6bda86f99c85b9ec5f6 Mon Sep 17 00:00:00 2001 From: Oscar Date: Sat, 29 Jun 2019 08:08:12 +0200 Subject: [PATCH 1/2] Update directory-structure.md --- packages/docs/docs/guide/directory-structure.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/docs/docs/guide/directory-structure.md b/packages/docs/docs/guide/directory-structure.md index 6c421cb67b..cf66608712 100644 --- a/packages/docs/docs/guide/directory-structure.md +++ b/packages/docs/docs/guide/directory-structure.md @@ -45,7 +45,7 @@ Please note the capitalization of the directory name. - `docs/.vuepress/enhanceApp.js`: App level enhancement. ::: warning Note -When customizing `templates/ssr.html`, or `templates/dev.html`, it is best to modify it on the basis of the [default template files](https://github.com/vuejs/vuepress/blob/master/packages/%40vuepress/core/lib/app/index.dev.html), otherwise it may cause a build failure. +When customizing `templates/ssr.html`, or `templates/dev.html`, it is best to modify it on the basis of the [default template files](https://github.com/vuejs/vuepress/blob/master/packages/%40vuepress/core/lib/client/index.dev.html), otherwise it may cause a build failure. ::: ## Default Page Routing From 93f6113731e7f22ad5f24eac20879a806ff7ced3 Mon Sep 17 00:00:00 2001 From: Oscar Date: Tue, 16 Jul 2019 15:29:53 +0200 Subject: [PATCH 2/2] Fix maxDepth when set to 0 in YAML --- .../theme-default/components/SidebarLink.vue | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/packages/@vuepress/theme-default/components/SidebarLink.vue b/packages/@vuepress/theme-default/components/SidebarLink.vue index 243ce7630b..bc5de287d8 100644 --- a/packages/@vuepress/theme-default/components/SidebarLink.vue +++ b/packages/@vuepress/theme-default/components/SidebarLink.vue @@ -32,12 +32,13 @@ export default { ? renderExternal(h, item.path, item.title || item.path) : renderLink(h, item.path, item.title || item.path, active) - const configDepth = $page.frontmatter.sidebarDepth - || sidebarDepth - || $themeLocaleConfig.sidebarDepth - || $themeConfig.sidebarDepth - - const maxDepth = configDepth == null ? 1 : configDepth + const maxDepth = [ + $page.frontmatter.sidebarDepth, + sidebarDepth, + $themeLocaleConfig.sidebarDepth, + $themeConfig.sidebarDepth, + 1 + ].find(depth => depth !== undefined); const displayAllHeaders = $themeLocaleConfig.displayAllHeaders || $themeConfig.displayAllHeaders