MkDocs CRD Viewer
mkdocs-crd-viewer renders Kubernetes CRD schemas as interactive, expandable tree views inside MkDocs pages.
The package provides:
crd-viewerMkDocs plugin for CSS/JS asset wiring.crd_viewer(...)macro for rendering CRD schemas from Markdown.
Install
uv sync
Or install directly from GitHub with uv add:
uv add "mkdocs-crd-viewer @ git+https://github.com/eda-labs/mkdocs-crd-viewer@main"
Replace @main with a tag if you want a fixed release (for example @v0.1.0).
Configure
In your mkdocs.yml:
plugins:
- search
- crd-viewer
- macros:
modules:
- mkdocs_crd_viewer.macros
If you need custom Jinja delimiters, the demo config in demo/mkdocs.yml shows a working setup with -{{ ... }}-.
Macro Reference
There is currently one macro:
crd_viewer(path, version=None, title=None, collapsed=False, show_status=True)
| Parameter | Type | Default | Description |
|---|---|---|---|
path |
str |
required | Relative or absolute path to a CRD YAML file. Relative paths resolve from the MkDocs project root. |
version |
str | None |
storage version | CRD version to render. Falls back to storage, then served, then first entry. |
title |
str | None |
selected kind | Override the viewer title. |
collapsed |
bool |
False |
Render inside a collapsed <details> wrapper. |
show_status |
bool |
True |
Include the status schema section when available. |
Each file should contain exactly one CustomResourceDefinition document.
Usage Patterns
Default call:
-{{ crd_viewer("crds/fabrics.eda.nokia.com.yaml") }}-
Select a specific version and custom title:
-{{ crd_viewer("crds/fabrics.eda.nokia.com.yaml", version="v1alpha1", title="Fabric (v1alpha1)") }}-
Collapsed/spec-only view:
-{{ crd_viewer("crds/fabrics.eda.nokia.com.yaml", collapsed=True, show_status=False) }}-
Plugin Configuration
crd-viewer accepts:
| Option | Type | Default | Description |
|---|---|---|---|
asset_dir |
str |
assets/mkdocs-crd-viewer |
Output path (inside site_dir) for crd-viewer.css and crd-viewer.js. |
Demo and Tests
Run the demo site:
uv run mkdocs serve -f demo/mkdocs.yml
Run tests:
uv run pytest
Metadata
Release files for mkdocs-crd-viewer 0.2.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mkdocs_crd_viewer-0.2.2.tar.gz | 53.7 kB | Without provenance | Details for mkdocs_crd_viewer-0.2.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mkdocs_crd_viewer-0.2.2-py3-none-any.whl | Python 3 | none | any | Details for mkdocs_crd_viewer-0.2.2-py3-none-any.whl |
Total release size: 67.1 kB
Release files / mkdocs_crd_viewer-0.2.2.tar.gz
| Download URL | mkdocs_crd_viewer-0.2.2.tar.gz |
|---|---|
| Size | 53.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
492fd200ccb96f87c1e293f9b22223e76c66b7172deb94e06fa1bf9474d5dc41
|
|
BLAKE2b-256 checksum How to use checksums |
f32c4bdb3359d9d15cedbc7a3ff734be199c633affc39997fa58b8b5ad3b244b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.11.29 {"installer":{"name":"uv","version":"0.11.29","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / mkdocs_crd_viewer-0.2.2-py3-none-any.whl
| Download URL | mkdocs_crd_viewer-0.2.2-py3-none-any.whl |
|---|---|
| Size | 13.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
588cb4121fad9cbbd8c51f69e59b19ea5ae63c718be08ca5583c85d4f264f66c
|
|
BLAKE2b-256 checksum How to use checksums |
95cf2e66b667068164396771fb8d0f6bfb7a51fa04a12b8af3b4cb9b317f7deb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.11.29 {"installer":{"name":"uv","version":"0.11.29","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for mkdocs-crd-viewer 0.2.2
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.