mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-11-30 18:24:35 +01:00
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
This commit is contained in:
parent
30f7c15368
commit
9adf66475a
@ -41,6 +41,7 @@ RUN \
|
|||||||
&& pip install --no-cache-dir \
|
&& pip install --no-cache-dir \
|
||||||
'mkdocs-minify-plugin>=0.2' \
|
'mkdocs-minify-plugin>=0.2' \
|
||||||
'mkdocs-git-revision-date-localized-plugin>=0.4' \
|
'mkdocs-git-revision-date-localized-plugin>=0.4' \
|
||||||
|
'mkdocs-awesome-pages-plugin>=2.2.1' \
|
||||||
&& rm -rf /tmp/*
|
&& rm -rf /tmp/*
|
||||||
|
|
||||||
# Set working directory
|
# Set working directory
|
||||||
|
68
docs/plugins/awesome-pages-plugin.md
Normal file
68
docs/plugins/awesome-pages-plugin.md
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
# Awesome Pages Plugin
|
||||||
|
|
||||||
|
[mkdocs-awesome-pages-plugin][1] is an extension that that simplifies configuring page titles and their order.
|
||||||
|
|
||||||
|
[1]: https://github.com/lukasgeiter/mkdocs-awesome-pages-plugin/
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
Install the plugin using `pip` with the following command:
|
||||||
|
|
||||||
|
``` sh
|
||||||
|
pip install mkdocs-awesome-pages-plugin
|
||||||
|
```
|
||||||
|
|
||||||
|
Next, add the following lines to your `mkdocs.yml`:
|
||||||
|
|
||||||
|
``` yaml
|
||||||
|
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:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
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.
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
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:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
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`:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
collapse: true
|
||||||
|
```
|
60
material/assets/javascripts/application.39c71e94.js
Normal file
60
material/assets/javascripts/application.39c71e94.js
Normal file
File diff suppressed because one or more lines are too long
1
material/assets/javascripts/modernizr.eca31fed.js
Normal file
1
material/assets/javascripts/modernizr.eca31fed.js
Normal file
File diff suppressed because one or more lines are too long
@ -132,6 +132,7 @@ nav:
|
|||||||
- PyMdown: extensions/pymdown.md
|
- PyMdown: extensions/pymdown.md
|
||||||
- Plugins:
|
- Plugins:
|
||||||
- Search: plugins/search.md
|
- Search: plugins/search.md
|
||||||
|
- Pages: plugins/awesome-pages-plugin.md
|
||||||
- Minification: plugins/minification.md
|
- Minification: plugins/minification.md
|
||||||
- Revision date: plugins/revision-date.md
|
- Revision date: plugins/revision-date.md
|
||||||
- Releases:
|
- Releases:
|
||||||
|
Loading…
Reference in New Issue
Block a user