Skip to main content

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

scene v1 {
  + client: Client
  + api: API
  + db: Database
  + client -> api
  + api -> db
  client ~> api: GET /user/42
  api ~> db: SELECT
}

scene v2 {
  + cache: Cache
  - api -> db
  + 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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mkdocs_markgraf-0.0.31.tar.gz (170.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mkdocs_markgraf-0.0.31-py3-none-any.whl (170.9 kB view details)

Uploaded Python 3

File details

Details for the file mkdocs_markgraf-0.0.31.tar.gz.

File metadata

  • Download URL: mkdocs_markgraf-0.0.31.tar.gz
  • Upload date:
  • Size: 170.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for mkdocs_markgraf-0.0.31.tar.gz
Algorithm Hash digest
SHA256 2e155cf6ba2f8bd4c4bb57a56df903db8cbdcc1b62f254cb30189098235b7281
MD5 631197a9ed5a77c75437c0eaa5433590
BLAKE2b-256 90501b01bdba8f045ed43ebd93dd4f6e76c00344a742f2abd77474856b4e5ae5

See more details on using hashes here.

Provenance

The following attestation bundles were made for mkdocs_markgraf-0.0.31.tar.gz:

Publisher: publish.yml on markgrafhq/mkdocs-markgraf

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mkdocs_markgraf-0.0.31-py3-none-any.whl.

File metadata

File hashes

Hashes for mkdocs_markgraf-0.0.31-py3-none-any.whl
Algorithm Hash digest
SHA256 8fb05852417710c9db2f55747d79fdc8e9656b1750065aee4dece524b60e295d
MD5 a22b61a340bec0b9aa36e27aa8e59e48
BLAKE2b-256 e9fa76032f2f02c59d8ee591cf92488367dcd49ae79a0586e07d875eb9f51ca3

See more details on using hashes here.

Provenance

The following attestation bundles were made for mkdocs_markgraf-0.0.31-py3-none-any.whl:

Publisher: publish.yml on markgrafhq/mkdocs-markgraf

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.0.31 This release

2 files

0.0.30

2 files

0.0.29

2 files

0.0.28

2 files

0.0.27

2 files

0.0.26

2 files

0.0.25

2 files

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