Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zachhannum/mkdocs-toc-sidebar-plugin
An MkDocs plugin that allows users to add additional content to the ToC sidebar using the Material theme
https://github.com/zachhannum/mkdocs-toc-sidebar-plugin
Last synced: 12 days ago
JSON representation
An MkDocs plugin that allows users to add additional content to the ToC sidebar using the Material theme
- Host: GitHub
- URL: https://github.com/zachhannum/mkdocs-toc-sidebar-plugin
- Owner: zachhannum
- License: mit
- Created: 2020-01-11T06:11:10.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2021-05-30T09:12:08.000Z (over 3 years ago)
- Last Synced: 2024-10-15T07:43:52.704Z (29 days ago)
- Language: Python
- Size: 376 KB
- Stars: 5
- Watchers: 3
- Forks: 3
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# mkdocs-toc-sidebar-plugin
An MkDocs plugin that allows users to add additional content to the ToC sidebar using the Material theme.
![demo image](img/mkdocs-toc-sidebar.png)
## Pre-requisites
Currently this plugin will only work with the Table of Contents sidebars in the [Material](https://github.com/squidfunk/mkdocs-material) theme for MkDocs.
## Setup
Install the plugin using pip:
`pip install mkdocs-toc-sidebar-plugin`
Activate the plugin in `mkdocs.yml`:
```yaml
plugins:
- search
- toc-sidebar
```> **Note:** 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, but now you have to enable it explicitly.
More information about plugins in the [MkDocs documentation][mkdocs-plugins].
## Usage
To add a toc sidebar to one of your markdown pages, simply add a div anywhere in the markdown source like so:
```markdown
```## See Also
More information about templates [here][mkdocs-template].
More information about blocks [here][mkdocs-block].
[mkdocs-plugins]: http://www.mkdocs.org/user-guide/plugins/
[mkdocs-template]: https://www.mkdocs.org/user-guide/custom-themes/#template-variables
[mkdocs-block]: https://www.mkdocs.org/user-guide/styling-your-docs/#overriding-template-blocks