Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Navbar disabling option (#187) #232

Merged
merged 6 commits into from
Apr 24, 2018
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
16 changes: 15 additions & 1 deletion docs/default-theme-config/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,11 @@ Any additional content after the `YAML front matter` will be parsed as normal ma

If you want to use a completely custom homepage layout, you can also use a [Custom Layout](#custom-layout-for-specific-pages).

## Navbar Links
## Navbar

The Navbar may contain your page title, [Search Box](#search-box), [Navbar Links](#navbar-links), [Languages](/guide/i18n.html#internationalization) and [Repository link](/default-theme-config/#git-repo-and-edit-links) - all of them depends on your configuration.

### Navbar Links

You can add links to the navbar via `themeConfig.nav`:

Expand Down Expand Up @@ -86,6 +90,16 @@ module.exports = {
}
```

### Disable the Navbar

You can disable the navbar for a specific page via `YAML front matter`:

``` yaml
---
navbar: false
---
```

## Sidebar

To enable the sidebar, use `themeConfig.sidebar`. The basic configuration expects an Array of links:
Expand Down
2 changes: 2 additions & 0 deletions lib/default-theme/Layout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ export default {
computed: {
shouldShowNavbar () {
const { themeConfig } = this.$site
const { frontmatter } = this.$page
if (frontmatter.navbar === false) return false
return (
this.$title ||
themeConfig.logo ||
Expand Down