1
0
mirror of https://github.com/squidfunk/mkdocs-material.git synced 2024-11-14 19:07:41 +01:00
mkdocs-material/docs/plugins/awesome-pages-plugin.md
Taylor Steinberg 9adf66475a
Added mkdocs-awesome-pages-plugin to Dockerfile (#1519)
* Adds mkdocs-awesome-pages-plugin to Dockerfile and adds plugins documentation

* Adds additional usage documentation for the awesome-pages plugin

* Update mkdocs.yml
2020-03-20 16:15:55 +01:00

1.7 KiB

Awesome Pages Plugin

mkdocs-awesome-pages-plugin is an extension that that simplifies configuring page titles and their order.

Installation

Install the plugin using pip with the following command:

pip install mkdocs-awesome-pages-plugin

Next, add the following lines to your mkdocs.yml:

plugins:
  - search
  - awesome-pages

!!! warning "Remember to re-add the search plugin"

If you have no `plugins` entry in your config file yet, you'll likely also
want to add the `search` plugin. MkDocs enables it by default if there is
no `plugins` entry set.

Usage

Set Directory Title

Create a YAML file named .pages in a directory and set the title to override the title of that directory in the navigation:

title: Page Title

Arrange Pages

Create a YAML file named .pages in a directory and set the arrange attribute to change the order of how child pages appear in the navigation. This works for actual pages as well as subdirectories.

title: Page Title
arrange:
    - page1.md
    - page2.md
    - subdirectory

Hide Directory

Create a YAML file named .pages in a directory and set the hide attribute to true to hide the directory, including all sub-pages and sub-sections, from the navigation:

hide: true

Collapse Pages

This plugin supports collapsing directories that contain a single page

If you want to enable or disable collapsing of a single page, without applying the setting recursively, create a YAML file called .pages in the directory and set collapse to true or false:

collapse: true