Skip to main content

MkDocs Redoc Tag

PyPI version PyPI downloads Codecov

A MkDocs plugin supports adding Redoc to the page.

Features

  1. OpenAPI Specification file from online over URL or static file in docs
  2. All dependencies are using static files handled by the plugin not from CDN, especially suitable for those documents been deployed in the intranet
  3. Synchronized dark mode with Material for MkDocs

Dependency

  1. Python Package
    1. beautifulsoup4>=4.11.1
  2. Redoc standalone javascript from official CDN
    1. redoc==2.4.0

Usage

  1. Install the plugin from Pypi

    pip install mkdocs-redoc-tag
    
  2. Add redoc-tag plugin into your mkdocs.yml plugins sections:

    plugins:
       - redoc-tag
    
  3. Add redoc tag in markdown to include Redoc:

    <redoc src="https://petstore.swagger.io/v2/swagger.json"/>
    

    Redoc Sample Image

  4. You may customize the plugin by passing options in mkdocs.yml:

    plugins:
       - redoc-tag:
            background: White
    
    Options Type Description
    background String Default: "". Redoc iframe body background attribute value. You can use any css value for background for example "#74b9ff" or "Gainsboro" or "" for nothing.
    height String Default: "80vh". Height of Redoc iframe.

How it works

  1. Copy Redoc script file into site/assets/javascripts/ directory
  2. Search all redoc tags, then convert them to an iframe tag and generate the iframe target html with the given OpenAPI Specification src path

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

Reference

  1. redark: source of dark mode javascript and css

Metadata

Release files for mkdocs-redoc-tag 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mkdocs-redoc-tag 0.2.0
File Size Uploaded Provenance Actions
mkdocs_redoc_tag-0.2.0.tar.gz 285.9 kB With provenance Details for mkdocs_redoc_tag-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mkdocs-redoc-tag 0.2.0
File Interpreter ABI Platform Actions
mkdocs_redoc_tag-0.2.0-py3-none-any.whl Python 3 none any Details for mkdocs_redoc_tag-0.2.0-py3-none-any.whl

Total release size: 572.9 kB

Release files / mkdocs_redoc_tag-0.2.0.tar.gz

Download URL mkdocs_redoc_tag-0.2.0.tar.gz
Size 285.9 kB
Tags Source
SHA-256 checksum
How to use checksums
e50825c19586f2383b97b51d4b225fd83df83556dd2fe27515cb94ee25777897
BLAKE2b-256 checksum
How to use checksums
f7a48f868c441a2be902a44343c349c9d7a4cceefc4141bf18386162d2915478
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 5, 2025.

Transparency log

Release files / mkdocs_redoc_tag-0.2.0-py3-none-any.whl

Download URL mkdocs_redoc_tag-0.2.0-py3-none-any.whl
Size 287.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e15c9d45699a05d182676d5a8baf6bc81579543a562891ff1deb3f1524589ca4
BLAKE2b-256 checksum
How to use checksums
30ff63e91376c6198355246dcb2f78d2cccfea8601de9c53817f9682b622673e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 5, 2025.

Transparency log

Security for mkdocs-redoc-tag 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for mkdocs_redoc_tag-0.2.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 5, 2025.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page