Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion docs/default-theme-config/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down
6 changes: 5 additions & 1 deletion lib/default-theme/Layout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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 ||
Expand Down