Added better explanation for tabs feature

This commit is contained in:
squidfunk 2019-02-09 17:33:08 +01:00
parent 6c140b8e38
commit 5501462b85

View File

@ -510,10 +510,13 @@ theme:
> Default: `false` > Default: `false`
Material supports another layer on top of the main navigation for larger By default, the entire navigation is rendered on the left side using collapsible
screens in the form of tabs. This is especially useful for larger documentation sections (different from the default MkDocs theme which renders the top-level
projects with only few top-level sections. Tabs can be enabled by setting the sections in the header), because horizontal navigation is often problematic on
respective feature flag to true: smaller screens. However, for large documentation projects it's sometimes
desirable to add another navigation layer to separate top-level sections.
Material achieves this with the tabs feature, which can be enabled by setting
the respective feature flag to `true`:
``` yaml ``` yaml
theme: theme:
@ -521,6 +524,12 @@ theme:
tabs: true tabs: true
``` ```
When tabs are enabled, *top-level sections* will be rendered in an additional
layer directly below the header. The navigation on the left side will only
include the pages contained within the selected section. Furthermore, *top-level
pages* defined inside your project's `mkdocs.yml` will be grouped under the
first tab which will receive the title of the first page.
## Customization ## Customization
### Adding a source repository ### Adding a source repository