Skip to main content

MkDocs plugin to integrate HTML reports into your site.

Project description

MkDocs Iframe Plugin

ci documentation pypi version

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.

coverage index test index

Project details


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 details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mkdocs_iframe-0.1.0-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

Details for the file mkdocs_iframe-0.1.0.tar.gz.

File metadata

  • Download URL: mkdocs_iframe-0.1.0.tar.gz
  • Upload date:
  • Size: 42.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: pdm/2.7.0 CPython/3.10.10

File hashes

Hashes for mkdocs_iframe-0.1.0.tar.gz
Algorithm Hash digest
SHA256 6d402e539c9ea6c7d5a341a6ae4169da63f710f32b8e94a658ad5c101a31e625
MD5 13bb51c6e6c86eb30d1f96963aa821cf
BLAKE2b-256 eb78c2d76eeef5321e3fddef6c534a2156b1a605acdd3da9a00f714efd551927

See more details on using hashes here.

File details

Details for the file mkdocs_iframe-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: mkdocs_iframe-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: pdm/2.7.0 CPython/3.10.10

File hashes

Hashes for mkdocs_iframe-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 664cba038df8fc8636330a60e115396a01dc9c6cbb36455d08ad04502391e5af
MD5 052a7df16d32ce5abeb9530f51329583
BLAKE2b-256 587e4597d017cbdd0d45dc1ddf79fcd05d7cc91c782a2f4f408dd0ca9edc1207

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page