A MkDocs plugin supports adding Redoc to the page.
Install the plugin from Pypi
pip install mkdocs-redoc-tag
Add redoc-tag
plugin into your mkdocs.yml plugins sections:
plugins:
- redoc-tag
Add redoc
tag 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. |
site/assets/javascripts/
directoryThis project is licensed under the MIT License - see the LICENSE.md file for details.