This project is a template for creating Python projects with documentation generated using MkDocs. It provides a standard project structure, a sample requirements.txt
for dependencies, and configurations for generating documentation in a simple, beautiful, and accessible format.
- Organized Python Project Structure: Includes
docs/
directory for markdown documentation files. - MkDocs Integration: Easily create and serve project documentation locally or deploy to GitHub Pages.
- Dependency Management: Use
requirements.txt
for managing project dependencies. - Sample Scripts: Helpful Bash scripts for managing virtual environments and installing dependencies.
Make sure you have the following installed:
- Python 3.6+
.
|── .github
| |── workflows # Github actions scripts
| |── ...
|── docs/ # MkDocs documentation files
| |── res # Ressources (images, etc...) for the documentation
| |── stylesheets # Custom CSS theme for your documentation
| |── index.md # Home page for the documentation
| |── ... # Additional documentation files
|── scripts # Scripts to generate the venv and deploy locally
|── requirements.txt # Python dependencies
|── mkdocs.yml # MkDocs configuration file
.
-
Clone the repository:
git clone https://github.com/username/repo-name.git cd repo-name
-
Create a virtual environment, installs dependencies (recommended):
sh scripts/venv.sh make
You can place your documentation files in the docs/
directory and use it as your primary documentation location.
Each new markdown file has to be registered in the mdkocs.yml file (see mkdocs documentation).
-
Build the documentation:
mkdocs build
or
sh scripts/build_static.sh
This will generate static HTML files in the
site/
directory. -
Serve documentation locally:
mkdocs serve
or
sh scripts/deploy_locally.sh
Navigate to
http://127.0.0.1:8000
in your browser to view the documentation.
- Push to the main branch and let the magic happen 😊.
Customize the MkDocs configuration by editing mkdocs.yml
. Here you can change the site name, theme, navigation, and more.
If you want to contribute to this project template:
- Fork the repository.
- Create a new branch (
git checkout -b feature/YourFeature
). - Make your changes.
- Push your branch (
git push origin feature/YourFeature
). - Open a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.