Getting Started with MkDocs¶
MkDocs is a documentation generator that focuses on speed and simplicity. It has many great features including:
- Preview your documentation as you write it
- Easy customization with themes and extensions
- Writing documentation with Markdown
MkDocs is a great choice for building technical documentation. However, Read the Docs also supports Sphinx, another tool for writing and building documentation.
Assuming you have Python already, install MkDocs:
pip install mkdocs
Setup your MkDocs project:
mkdocs new .
This command creates
mkdocs.yml which holds your MkDocs configuration,
docs/index.md which is the Markdown file
that is the entry point for your documentation.
You can edit this
index.md file to add more details about your project
and then you can build your documentation:
This command builds your Markdown files into HTML and starts a development server to browse your documentation. Open up http://127.0.0.1:8000/ in your web browser to see your documentation. You can make changes to your Markdown files and your docs will automatically rebuild.
Once you have your documentation in a public repository such as GitHub, Bitbucket, or GitLab, you can start using Read the Docs by importing your docs.