You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A ReadTheDocs theme for MkDocs with collapsing menu support.
How to install
Install the ReadTheDocs Dropdown theme with pip:
pip install mkdocs-rtd-dropdown
Set the theme name to rtd-dropdown in your projects mkdocs.yml:
theme:
name: 'rtd-dropdown'
How to use
See the supplied docs folder as an example. The main limitation is each file name needs to be the same as the
first heading in each file. This seems to be a fairly common configuration.
MkDocs added navigation improvemetns which allows this theme to support more than 2 collapsing levels.
The stylesheets are currently only configured for 4 levels. Please reaise an issue if you need style support for more than that.
How to use (Old Version, pre-v1.0)
Similar to readthedocs.io, this theme is built
assuming a flat file structure.
File Structure (Old Version, pre-v1.0)
Right now, your documentation can only use the first two file levels. I'm working on
adding support for a 3rd level.
In the example above, MkDocs will be a linked-page on the sidebar (to index.md) while UserGuide
will be a category containing the pages nested under it (ex. Instructions which contains instructions.md)
Note: If you don't declare your doc-structure explicitly in mkdocs.yml, each folder is considered a file level.
Collapsing
The dropdown menu is controlled by heading levels.