{"id":24040,"library":"mkdocs-coverage","title":"MkDocs Coverage Plugin","description":"MkDocs plugin to integrate your Coverage.py HTML report into your MkDocs site. Version 2.0.0 removes deprecated code and requires MkDocs 1.6+. It supports inserting coverage reports as new pages or into existing pages via a placeholder token.","status":"active","version":"2.0.0","language":"python","source_language":"en","source_url":"https://github.com/pawamoy/mkdocs-coverage","tags":["mkdocs","coverage","plugin","documentation"],"install":[{"cmd":"pip install mkdocs-coverage","lang":"bash","label":"PyPI"}],"dependencies":[],"imports":[{"note":"","wrong":"","symbol":"MkDocsCoverage","correct":"from mkdocs_coverage import MkDocsCoverage"}],"quickstart":{"code":"# mkdocs.yml\nplugins:\n  - search\n  - coverage","lang":"yaml","description":"Add the coverage plugin to your mkdocs.yml and run `coverage html` plus `mkdocs serve`."},"warnings":[{"fix":"Rename `page_name` to `page_path` in mkdocs.yml and any custom configurations.","message":"v2.0.0 removed deprecated code; ensure all configurations use the updated option names (e.g., `page_path` instead of `page_name`).","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"Use `page_path` instead, which supports nested paths like 'coverage/index.md'.","message":"The `page_name` option was deprecated in v1.2.0 and removed in v2.0.0.","severity":"deprecated","affected_versions":"<=1.2.0"},{"fix":"Upgrade MkDocs to >=1.6.","message":"v1.1.0 dropped support for MkDocs <1.6, requiring MkDocs 1.6+.","severity":"breaking","affected_versions":">=1.1.0"},{"fix":"Run `coverage html` before `mkdocs build` or `mkdocs serve`.","message":"The plugin expects the coverage HTML report to already exist before mkdocs is run. It does not generate the report itself.","severity":"gotcha","affected_versions":"all"},{"fix":"Insert `<!--coverage-->` in the markdown file where the report should appear.","message":"If using the `placeholder` option, the placeholder string must be exactly `<!--coverage-->` (case-sensitive).","severity":"gotcha","affected_versions":">=1.2.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run `coverage html` in your project root, or set the `htmlcov_dir` option in mkdocs.yml to point to the correct directory.","cause":"The coverage HTML report has not been generated or is in a non-default location.","error":"Could not find coverage report at '.../htmlcov/index.html'"},{"fix":"Install mkdocs-coverage: `pip install mkdocs-coverage`, then add `coverage` under `plugins` in mkdocs.yml.","cause":"The package is not installed or not listed in the `plugins` list in mkdocs.yml.","error":"Plugin 'coverage' is not registered"},{"fix":"Ensure `mkdocs-coverage` is installed and that your mkdocs.yml does not have a typo (e.g., `coverge`).","cause":"MkDocs cannot find the plugin entry point.","error":"No such plugin: coverage"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}