I did this project to understand how to customize mkdocs. This is a sort of stable, minimal and working solution that everyone can use as starting point to create their custom themes.
For more features I'll commit to this repo:
pip install mkdocs-dark-minimal-dirtree
python -m mkdocs new proj1
code proj1/
nano mkdocs.yml
site_name: My Docs
theme:
name: dark_minimal_dirtree
python -m mkdocs serve
Everything that contains a markdown file inside the docs
directory is listed in the navigation menu on the left.
The order is by filename and not by title.
This is good because you can name every file like:
- index.md
- 000.md
- dir1
- 000.md
- 001.md
But you can always change title as you want:
- index.md (Home)
- 000.md (part1)
- dir1
- 000.md (part2)
- 001.md (part3)
Resulting in:
- Home
- part1
- dir1 (this is collapsable)
- part2
- part3
-
Go here and download the .tar.gz file
-
Create a new project with
python -m mkdocs new proj
-
Extract
dark_minimal_dirtree
inside the project:docs index.md mkdocs.yml dark_minimal_dirtree
-
Edit the
mkdocs.yml
filesite_name: My Docs theme: name: null custom_dir: dark_minimal_dirtree