MkDocs plugin to integrate HTML reports into your site.
Project description
MkDocs Iframe Plugin
MkDocs plugin to integrate HTML reports into your site. This is a modified version of mkdocs-coverage.
Installation
With pip
:
pip install mkdocs-iframe
With pipx
:
python -m pip install --user pipx
pipx install mkdocs-iframe
Usage
You first need generate your html test reports. For example, using pytest-cov and pytest-html:
pytest --cov --html=htmltest/index.html tests
coverage html
will generate two report directories htmlcov
and htmltest
.
Now update your MkDocs
config:
# mkdocs.yml
nav:
- Coverage report: cov.md # Needs to match page from below
- Test report: test.md # Needs to match page from below
plugins:
- iframe:
reports:
- name: cov
path: htmlcov # default f"html{name}"
root: index.html # default
page: cov.md # f"{name}.md"
- name: test
path: htmltest # default f"html{name}"
root: index.html # default
page: test.md # f"{name}.md"
Give the default settings, you could also use the following, simpler config:
# mkdocs.yml
nav:
- Coverage report: cov.md
- Test report: test.md
plugins:
- iframe:
reports:
- cov
- test
Now serve your docs and go to http://localhost:8000/cov/ or http://localhost:8000/test/ to see your test report.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
mkdocs_iframe-0.1.0.tar.gz
(42.2 kB
view hashes)
Built Distribution
Close
Hashes for mkdocs_iframe-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 664cba038df8fc8636330a60e115396a01dc9c6cbb36455d08ad04502391e5af |
|
MD5 | 052a7df16d32ce5abeb9530f51329583 |
|
BLAKE2b-256 | 587e4597d017cbdd0d45dc1ddf79fcd05d7cc91c782a2f4f408dd0ca9edc1207 |