Plugin docs with MKDocs
Using MkDocs¶
This README.md
provides basic instructions for setting up and using MkDocs to generate documentation.
Prerequisites¶
- Python 3.6 or higher
- pip (Python package manager)
Installation¶
Clone the repository:
Create and activate a virtual environment:
On Linux/macOS:
On Windows:
Install MkDocs and the Material theme:
Project Structure¶
Ensure your project has the following structure:
your-repository/
├── docs/
│ ├── index.md
│ ├── ... (other Markdown files)
├── mkdocs.yml
└── README.md
- docs/: Folder containing the Markdown files for the documentation.
- mkdocs.yml: MkDocs configuration file.
- README.md: This file.
MkDocs Configuration¶
Example mkdocs.yml
file:
site_name: "Site Name"
theme:
name: "material"
nav:
- Home: index.md
- Page 1: page1.md
- Page 2: page2.md
markdown_extensions:
- toc:
permalink: true
- admonition
- pymdownx.highlight
- pymdownx.inlinehilite
- pymdownx.superfences
- pymdownx.tabbed
- pymdownx.snippets
Generate and Serve Documentation¶
- Navigate to the project directory:
- Start the development server:
- Open your browser and navigate to:
Build Documentation for Production¶
To generate the static files for the documentation:
The generated files will be located in the site/
folder.
Debug MkDocs¶
To debug MkDocs, follow these steps: