mirror of
https://github.com/MichaelCurrin/mkdocs-quickstart.git
synced 2026-03-28 17:42:47 +01:00
1.3 KiB
1.3 KiB
Tutorial
How to create a MkDocs site
This is a summary of the tutorial on mkdocs.org.
Basic structure
This is the simplest MkDocs site you can make:
mkdocs.yml- Config at the root.docs/index.md- Homepage in thedocsdirectory (by default).
The steps below start with that and extend it to more pages.
Run this command to create the starter site above. This make the steps below go quicker.
cd my-project
mkdocs new PATH
Setup site
- Create docs pages.
- Create
docsdirectory. - Create
index.md - Create other pages (optional).
- Create
- Setup config.
- Create
mkdocs.ymlat project root. - Setup navbar there. e.g.
nav: - Home: index.md - About: about.md - Choose a theme. e.g.
theme: readthedocs
- Create
- Create a favicon (optional).
- It will be picked up at this path:
docs/img/favicon.ico.
- It will be picked up at this path:
- Add to your
.gitignore.- Add build directory. This will prevent it from being versioned on
masterbranch. - Add virtual environment, if using one.
- e.g.
site/ venv
- Add build directory. This will prevent it from being versioned on
Further configuration
See Configuration page on MkDocs site for options.