Skip to main content

A Zensical extension for rendering WaveDrom diagrams in Markdown

Project description

Zensical WaveDrom Plugin

A Zensical extension for rendering WaveDrom diagrams in Markdown.

This is a port of the mkdocs-wavedrom-plugin (or, my maintained fork) for the Zensical static site generator.

Features

  • Transform fenced code blocks with language wavedrom into WaveDrom script tags or embedded SVG
  • Support for pymdownx.superfences custom fences
  • Optional SVG embedding at build time (no JavaScript required)

Installation

pip install zensical-wavedrom-plugin

Configuration

Add to your zensical.toml:

Default mode (JavaScript rendering)

In default mode, WaveDrom code blocks are transformed into <script type="WaveDrom"> tags and the WaveDrom JavaScript library processes them on page load.

[project.markdown_extensions.fenced_code]
[project.markdown_extensions.wavedrom]

Embed SVG mode

When embed_svg = true is set, WaveDrom diagrams are rendered to SVG at build time. This means no JavaScript is required on the client side.

[project.markdown_extensions.fenced_code]
[project.markdown_extensions.wavedrom]
embed_svg = true

Pymdownx Integration

This plugin integrates with pymdownx.superfences to provide custom fence support when pymdownx is used instead of fenced_code.

[project.markdown_extensions.pymdownx.superfences]
custom_fences = [
  { name = "wavedrom", class = "wavedrom", format = "zensical_wavedrom_plugin.extension.fence_wavedrom_format" }
]
[project.markdown_extensions.wavedrom]

Usage

In your Markdown files:

```wavedrom
{ signal: [
  { name: "clk",  wave: "p....." },
  { name: "data", wave: "x.345x" }
] }
```

License

This project is licensed under the MIT License.

Project details


Download files

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

Source Distribution

zensical_wavedrom_plugin-0.1.0.tar.gz (7.1 kB view details)

Uploaded Source

Built Distribution

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

zensical_wavedrom_plugin-0.1.0-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

Details for the file zensical_wavedrom_plugin-0.1.0.tar.gz.

File metadata

  • Download URL: zensical_wavedrom_plugin-0.1.0.tar.gz
  • Upload date:
  • Size: 7.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.4 CPython/3.13.12 Linux/6.14.11-x64v3-xanmod1

File hashes

Hashes for zensical_wavedrom_plugin-0.1.0.tar.gz
Algorithm Hash digest
SHA256 77b4c6f290f3611667efa495d0b5d81ce83b1460cd1af8b4f01125f103766da9
MD5 247fdc53329c73003dec4eb21024d8c4
BLAKE2b-256 9b1db350da38676d1a5fef7e7783d031db9e2e8a13193bdba4546b274eed585a

See more details on using hashes here.

File details

Details for the file zensical_wavedrom_plugin-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for zensical_wavedrom_plugin-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b9afa53eceebbeacb9f2ea822f46ff361011b0ea8a8f8c641322540bdd710d7e
MD5 e300b06f4fcfe70604dd27d0a66d60bc
BLAKE2b-256 caa3003bdc4cb53686a832702814b75a3fbd71fc3bae6df3f4eb8788eeae61f5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page