A MkDocs plugin supports for add Redoc in page.
Project description
MkDocs Redoc Tag
A MkDocs plugin supports adding Redoc to the page.
Features
- OpenAPI Specification file from online over URL or static file in docs
- All dependencies are using static files handled by the plugin not from CDN, especially suitable for those documents been deployed in the intranet
- Synchronized dark mode with Material for MkDocs
Dependency
- Python Package
- beautifulsoup4>=4.11.1
- Redoc standalone javascript from official CDN
- redoc==2.4.0
Usage
-
Install the plugin from Pypi
pip install mkdocs-redoc-tag
-
Add
redoc-tagplugin into your mkdocs.yml plugins sections:plugins: - redoc-tag
-
Add
redoctag in markdown to include Redoc:<redoc src="https://petstore.swagger.io/v2/swagger.json"/>
-
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
- Copy Redoc script file into
site/assets/javascripts/directory - 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
- redark: source of dark mode javascript and css
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mkdocs_redoc_tag-0.2.0.tar.gz.
File metadata
- Download URL: mkdocs_redoc_tag-0.2.0.tar.gz
- Upload date:
- Size: 285.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e50825c19586f2383b97b51d4b225fd83df83556dd2fe27515cb94ee25777897
|
|
| MD5 |
f4b775bfc2e352901af5f258af188078
|
|
| BLAKE2b-256 |
f7a48f868c441a2be902a44343c349c9d7a4cceefc4141bf18386162d2915478
|
Provenance
The following attestation bundles were made for mkdocs_redoc_tag-0.2.0.tar.gz:
Publisher:
deploy-release.yml on blueswen/mkdocs-redoc-tag
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mkdocs_redoc_tag-0.2.0.tar.gz -
Subject digest:
e50825c19586f2383b97b51d4b225fd83df83556dd2fe27515cb94ee25777897 - Sigstore transparency entry: 192818552
- Sigstore integration time:
-
Permalink:
blueswen/mkdocs-redoc-tag@e8a209868a47903f4e17fc2f249d6c134b92998a -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/blueswen
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
deploy-release.yml@e8a209868a47903f4e17fc2f249d6c134b92998a -
Trigger Event:
push
-
Statement type:
File details
Details for the file mkdocs_redoc_tag-0.2.0-py3-none-any.whl.
File metadata
- Download URL: mkdocs_redoc_tag-0.2.0-py3-none-any.whl
- Upload date:
- Size: 287.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e15c9d45699a05d182676d5a8baf6bc81579543a562891ff1deb3f1524589ca4
|
|
| MD5 |
c28ebdf5c18fb5930561cdb67e7dc533
|
|
| BLAKE2b-256 |
30ff63e91376c6198355246dcb2f78d2cccfea8601de9c53817f9682b622673e
|
Provenance
The following attestation bundles were made for mkdocs_redoc_tag-0.2.0-py3-none-any.whl:
Publisher:
deploy-release.yml on blueswen/mkdocs-redoc-tag
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mkdocs_redoc_tag-0.2.0-py3-none-any.whl -
Subject digest:
e15c9d45699a05d182676d5a8baf6bc81579543a562891ff1deb3f1524589ca4 - Sigstore transparency entry: 192818553
- Sigstore integration time:
-
Permalink:
blueswen/mkdocs-redoc-tag@e8a209868a47903f4e17fc2f249d6c134b92998a -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/blueswen
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
deploy-release.yml@e8a209868a47903f4e17fc2f249d6c134b92998a -
Trigger Event:
push
-
Statement type: