MkDocs plugin that renders markgraf animations using the Canvas2D embed bundle.
Project description
mkdocs-markgraf
MkDocs plugin that renders markgraf animations inside documentation pages.
Fenced ```markgraf blocks become an interactive Canvas2D player with a
scrub bar, keyframe ticks, play/pause, and speed control. The bundled JS/CSS
ships with the plugin — no CDN, no external dependencies at runtime.
Install
pip install mkdocs-markgraf
Use
mkdocs.yml:
plugins:
- markgraf
Inside a page:
```markgraf
seed 1
frame v1 {
+node client "Client"
+node api "API"
+node db "Database"
+edge client api
+edge api db
client -> api "GET /user/42"
api -> db "SELECT"
}
frame v2 {
+node cache "Cache"
-edge api db
+edge api cache
client -> api "GET /user/42"
api -> cache "HIT"
}
```
Sizing
Constrain the embed via fence attributes:
```markgraf height=320
…
```
```markgraf width=420
…
```
```markgraf height=80svh
…
```
Values default to px; svh, vh, dvh, %, em, rem are accepted as
explicit units. height clamps max-height on the canvas; width clamps
max-width on the embed container.
Player controls
- Click the canvas or press Space anywhere to toggle play/pause.
- Click ticks on the scrub bar to jump between keyframes.
- Only one embed plays at a time — starting one pauses the others.
- The control bar is overlaid on the canvas and only shown on hover or focus.
Configuration
mkdocs.yml:
plugins:
- markgraf:
assets_subdir: assets/markgraf # where to copy the bundled JS/CSS
js_path: /path/to/markgraf-embed.js # override the bundled JS
css_path: /path/to/markgraf-embed.css # override the bundled CSS
License
MIT.
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_markgraf-0.1.11.tar.gz.
File metadata
- Download URL: mkdocs_markgraf-0.1.11.tar.gz
- Upload date:
- Size: 107.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3f0d7737143684476bb74dd1b3931dc7e54397bea171b4a884c6e1db1915daac
|
|
| MD5 |
16f4141978e359b086177ccd55e1598d
|
|
| BLAKE2b-256 |
fc1cdc049624fb7babe97c989bb29bbee5e03ea14eecf978d3c24be5feba644d
|
Provenance
The following attestation bundles were made for mkdocs_markgraf-0.1.11.tar.gz:
Publisher:
publish.yml on markgrafhq/mkdocs-markgraf
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mkdocs_markgraf-0.1.11.tar.gz -
Subject digest:
3f0d7737143684476bb74dd1b3931dc7e54397bea171b4a884c6e1db1915daac - Sigstore transparency entry: 1711968740
- Sigstore integration time:
-
Permalink:
markgrafhq/mkdocs-markgraf@9e4ec0e5f0ec83d75227d559b090b44bd9d0361a -
Branch / Tag:
refs/tags/v0.1.11 - Owner: https://github.com/markgrafhq
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@9e4ec0e5f0ec83d75227d559b090b44bd9d0361a -
Trigger Event:
push
-
Statement type:
File details
Details for the file mkdocs_markgraf-0.1.11-py3-none-any.whl.
File metadata
- Download URL: mkdocs_markgraf-0.1.11-py3-none-any.whl
- Upload date:
- Size: 107.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
87f4dfc3be193aca2ac09fce4f737b0cce811b2e17fb777a2d3e551aaad1d294
|
|
| MD5 |
051171deb650fbafbfd70c7b3c32f10a
|
|
| BLAKE2b-256 |
80693f5ae46c9a32fd47026be2a8e68093bd85bbea904cde83bed4cf2cdc13fd
|
Provenance
The following attestation bundles were made for mkdocs_markgraf-0.1.11-py3-none-any.whl:
Publisher:
publish.yml on markgrafhq/mkdocs-markgraf
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mkdocs_markgraf-0.1.11-py3-none-any.whl -
Subject digest:
87f4dfc3be193aca2ac09fce4f737b0cce811b2e17fb777a2d3e551aaad1d294 - Sigstore transparency entry: 1711968781
- Sigstore integration time:
-
Permalink:
markgrafhq/mkdocs-markgraf@9e4ec0e5f0ec83d75227d559b090b44bd9d0361a -
Branch / Tag:
refs/tags/v0.1.11 - Owner: https://github.com/markgrafhq
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@9e4ec0e5f0ec83d75227d559b090b44bd9d0361a -
Trigger Event:
push
-
Statement type: