🧭 导航和页面建设
Navigation & page building¶
exclude¶
Lets you exclude arbitrary file paths and patterns from the input. Normally, mkdocs will include every file in the docs directory in the output, which is not always what you want.
select-files¶
Filters out files (pages) using a parametrized regular expression.
- author: Jacques Supcik supcik
- links: PyPI | Github | Docs
- installation:
pip install mkdocs-select-files
awesome-pages¶
Simplifies configuring page titles and their order. Allows you to customize how your pages show up the navigation of your MkDocs without having to configure the full structure in your mkdocs.yml
. It gives you detailed control using a small configuration file directly placed in the relevant directory of your documentation.
Note: This plugin works best without a
nav
orpages
entry in yourmkdocs.yml
. Having anav
entry is supported, but you might not get the results you expect, especially if yournav
structure doesn’t match the file structure.
- author: Lukas Geiter lukasgeiter
- links: PyPI | Github | Docs
- installation:
pip install mkdocs-awesome-pages-plugin
mkdocs-nav-enhancements¶
Enhances the nav. Supports more types of Markdown titles, including level 1–6 atx-style headers and Setext-style headers. Collapses folders with only one file in, to help keep the nav clean.
navtitles¶
Ensures that all entries in the site navigation are shown with their best title. By default, if titles are not specified in the configuration yaml, the file name is used in their place which may not always be aesthetically pleasing. The plugin will add some build overhead as it effectively loads all pages twice.
- author: Andy Oakley andyoakley
- links: GitHub | Docs
- installation:
pip install git+https://github.com/andyoakley/mkdocs-navtitles
section-index¶
Makes nav section headings clickable, leading to a section index page.
nav: (mkdocs.yml) | Nav before | Nav after |
---|---|---|
| * Borgs * [Index](#) * [Foo](#) * [Bar](#) | * [Borgs](#) * [Foo](#) * [Bar](#) |
- author: Oleh Prypin oprypin
- links: PyPI | GitHub | Docs | Demo
- installation:
pip install mkdocs-section-index
literate-nav¶
Replaces the nav:
section of the mkdocs.yml
configuration with a simple Markdown file, or can infer (portions of) it from the documentation's directory structure.
An alternative to awesome-pages. Assists with migration from GitBook.
- author: Oleh Prypin oprypin
- links: PyPI | GitHub | Docs
- installation:
pip install mkdocs-literate-nav
encryptcontent¶
Allows you to have password protected articles and pages in MkDocs. The content is encrypted with AES-256 in Python using PyCrypto, and decrypted in the browser with Crypto-JS. It has been tested in Python 2.7 and Python 3.5.
awesome-list¶
Injects social media cards for each entry in an awesome-list.
- author: Carlos Pereira Atencio carlosperate
- links: Github | Docs
- installation:
pip install git+https://github.com/carlosperate/mkdocs-awesome-list-plugin
toc-sidebar¶
Allows users to add additional content to the ToC sidebar using the Material theme.
- author: Zach Hannum midnightprioriem
- links: PyPI | GitHub | Docs
- installation:
pip install mkdocs-toc-sidebar-plugin
mkdocs-simple-hooks¶
Define your own hooks for mkdocs, without having to create a new package.
- author: Andrzej Klajnert aklajnert
- links: PyPI | GitHub
- installation:
pip install mkdocs-simple-hooks
schema-reader¶
Converts JSON Schema files into readable documentation.
- author: Tom Robinson magicaljellybeans
- links: PyPI | Github
- installation:
pip install mkdocs-schema-reader
pagenav-generator¶
Plugin to quickly create a ToC like list of all pages within a directory, based on the directory's .pages
file.
This requires awesome-pages to work properly.
Just add a {nav}
where you want the list to show up.
- author: Lukas Geiter lukasgeiter (Distributed by Andre_601 Andre601
- links: GitHub
- installation:
pip install git+https://github.com/Andre601/mkdocs-pagenav-generator
mkdocs-categories-plugin¶
This plugin allows you to categorize the pages in your wiki. It allows for multiple categories per page and will generate a category index page with links to each page within the category. The title of your page will be used as the link text. It's easy to configure via the meta section of your pages:
---
categories:
- Novels
- Fiction
---