Contributing¶
Thank you for considering contributing to mkdocs-cdoc! Here's how to get started.
Development setup¶
git clone https://github.com/pawelsikora/mkdocs-cdoc.git
cd mkdocs-cdoc
python -m venv venv
source venv/bin/activate
pip install -e ".[dev]"
For full parsing support, install libclang:
Running tests¶
All 144+ tests should pass. Tests cover parsing (both clang and regex), rendering, cross-references, IGT metadata extraction, configuration handling, and more.
Code style¶
The project uses Black for formatting and flake8 for linting:
Please run both before submitting a PR. The CI pipeline enforces these checks.
Project structure¶
mkdocs_cdoc/
__init__.py # Version
plugin.py # MkDocs plugin — discovery, registration, rendering
parser.py # libclang-based C/C++ comment parser
regex_parser.py # Regex fallback parser
igt_parser.py # IGT TEST:/SUBTEST: metadata parser
renderer.py # Markdown rendering for doc comments
convert.py # gtk-doc → reST conversion (runtime + CLI)
tests/ # pytest test suite
example/ # Working example project with sample C sources
docs/ # Documentation site (this site)
How to contribute¶
Bug reports¶
Open an issue with a minimal reproducer — ideally a small .c file and mkdocs.yml that demonstrates the problem.
Feature requests¶
Open an issue describing the use case. If you're proposing a config change, include a sample mkdocs.yml showing how you'd expect it to work.
Pull requests¶
- Fork the repository
- Create a feature branch from
main - Make your changes
- Add or update tests as appropriate
- Run
black,flake8, andpytestlocally - Open a PR with a clear description of what changed and why
Documentation¶
The documentation site lives in docs/ and is built with MkDocs Material. To preview locally:
The example project builds separately:
Release process¶
- Update version in
mkdocs_cdoc/__init__.py,pyproject.toml, andsetup.py - Update documentation if needed
- Tag the release:
git tag v1.0.6 - Push:
git push origin main --tags - CI builds and deploys docs automatically