From e735f82334428a781c55b0fc25e0b7d1f6aa4179 Mon Sep 17 00:00:00 2001 From: Patzick Date: Tue, 24 Apr 2018 23:49:56 +0200 Subject: [PATCH 1/3] themeConfig global navbar disabling --- lib/default-theme/Layout.vue | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/default-theme/Layout.vue b/lib/default-theme/Layout.vue index bcb6436daa..2415059bc6 100644 --- a/lib/default-theme/Layout.vue +++ b/lib/default-theme/Layout.vue @@ -42,7 +42,11 @@ export default { shouldShowNavbar () { const { themeConfig } = this.$site const { frontmatter } = this.$page - if (frontmatter.navbar === false) return false + if ( + frontmatter.navbar === false || + themeConfig.navbar === false) { + return false + } return ( this.$title || themeConfig.logo || From aacf9ad3e95942dff99f0732cca4fab95241db87 Mon Sep 17 00:00:00 2001 From: Patzick Date: Tue, 24 Apr 2018 23:50:20 +0200 Subject: [PATCH 2/3] themeConfig global navbar disabling - docs --- docs/default-theme-config/README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/docs/default-theme-config/README.md b/docs/default-theme-config/README.md index 3860d42a6b..ba25248325 100644 --- a/docs/default-theme-config/README.md +++ b/docs/default-theme-config/README.md @@ -92,6 +92,17 @@ module.exports = { ### Disable the Navbar +To disable the navbar globally, use `themeConfig.navbar`. + +``` js +// .vuepress/config.js +module.exports = { + themeConfig: { + navbar: false + } +} +``` + You can disable the navbar for a specific page via `YAML front matter`: ``` yaml From 82686ba77a3f47765e0a5a9b06869b361978cf04 Mon Sep 17 00:00:00 2001 From: Patzick Date: Tue, 24 Apr 2018 23:51:39 +0200 Subject: [PATCH 3/3] typo correction --- docs/default-theme-config/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/default-theme-config/README.md b/docs/default-theme-config/README.md index ba25248325..7f88dba0c4 100644 --- a/docs/default-theme-config/README.md +++ b/docs/default-theme-config/README.md @@ -35,7 +35,7 @@ If you want to use a completely custom homepage layout, you can also use a [Cust ## Navbar -The Navbar may contain yourg page title, [Search Box](#search-box), [Navbar Links](#navbar-links), [Languages](../guide/i18n.md) and [Repository Link](#git-repo-and-edit-links), all of them depends on your configuration. +The Navbar may contain your page title, [Search Box](#search-box), [Navbar Links](#navbar-links), [Languages](../guide/i18n.md) and [Repository Link](#git-repo-and-edit-links), all of them depends on your configuration. ### Navbar Links