A Zensical extension for rendering WaveDrom diagrams in Markdown
Project description
Zensical WaveDrom Plugin
A Zensical extension for rendering WaveDrom diagrams in Markdown. Visit the demo site.
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
wavedrominto WaveDrom script tags or embedded SVG - Support for
pymdownx.superfencescustom 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]
extra_javascript = [
"https://cdnjs.cloudflare.com/ajax/libs/wavedrom/3.5.0/skins/default.js",
"https://cdnjs.cloudflare.com/ajax/libs/wavedrom/3.5.0/wavedrom.min.js"
]
[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
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 zensical_wavedrom_plugin-0.1.1.tar.gz.
File metadata
- Download URL: zensical_wavedrom_plugin-0.1.1.tar.gz
- Upload date:
- Size: 7.4 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
31b6d468e1420dc721212112f13346202c0f7b7d7196d81b9231b98003bb41ee
|
|
| MD5 |
f436618fa343be1225ea1389e2b5edcd
|
|
| BLAKE2b-256 |
babbe34138ce8dc1d2b044d25a029bc40dcca05c93d06976e59fdba412cd5bb2
|
File details
Details for the file zensical_wavedrom_plugin-0.1.1-py3-none-any.whl.
File metadata
- Download URL: zensical_wavedrom_plugin-0.1.1-py3-none-any.whl
- Upload date:
- Size: 5.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.3.4 CPython/3.13.12 Linux/6.14.11-x64v3-xanmod1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
37cfe42595260a29fc6f6603aee2ec2d2524491a708a441d953aa6d5a7fb31d6
|
|
| MD5 |
10d9ecb74038e9c54557586d97d5cf22
|
|
| BLAKE2b-256 |
b28bb8c5ea53240c2db4bd82376264337ca9153aa8a8d6e66b2f6e4910475b02
|