GitHub - encode/mkdocs
Repository navigation
mkdocsPublic
About
www.encode.io/mkdocs/Resources
Readme Activity Custom propertiesStars
37 starsWatchers
5 watchingForks
3 forks Report repositoryBranches
Tags
Go to Branches page Go to Tags page
Latest commit
History
130 Commits
View commit history for this file.
Folders and files
| Name | Name | Last commit message | Last commit date |
|---|---|---|---|
| .github/ workflows | .github/ workflows | ||
| docs | docs | ||
| scripts | scripts | ||
| src/ mkdocs | src/ mkdocs | ||
| tests | tests | ||
| .gitignore | .gitignore | ||
| pyproject.toml | pyproject.toml | ||
| requirements.txt | requirements.txt | ||
| uv.lock | uv.lock | ||
Repository files navigation
MkDocs
MkDocs is a smart, simple, website design tool.
Installation
To install MkDocs, run the following command from the command line:
pip install mkdocs --pre
This will install the version 2.0 pre-release. For full installation steps, including using uv and troubleshooting common issues, see the Installation Guide .
Getting started
- Create a
docs/README.mdpage. - Run
mkdocs serveto view your documentation in a browser. - Run
mkdocs buildto build a static website ready to host.
Writing your docs
- Create additional markdown pages.
- Use relative interlinking between pages.
- Include images and use relative interlinking from pages.
MkDocs supports GitHub Flavored Markdown for page authoring.
Styling your docs
- Create a
templates/base.htmlto customise the styling. - Include css and javascript to serve static files.
MkDocs uses Jinja templating for HTML rendering.
A starting point can be as simple as...
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{{ page.toc.title }}</title>
<link rel="stylesheet" href="{{ '/css/default.css' | url }}">
</head>
<body>
<main>
{{ page.html }}
</main>
</body>
</html>