Crates.io | mdbook-wavedrom-rs |
lib.rs | mdbook-wavedrom-rs |
version | 0.1.0 |
source | src |
created_at | 2023-06-18 10:49:17.67362 |
updated_at | 2023-06-18 10:49:17.67362 |
description | A MdBook preprocessor for WaveDrom Digital Timing Diagrams |
homepage | https://github.com/coastalwhite/wavedrom-rs |
repository | https://github.com/coastalwhite/wavedrom-rs |
max_upload_size | |
id | 893425 |
size | 55,773 |
Integration for wavedrom-rs with mdbook.
First, install the preprocessor utilizing the Rust Toolchain.
cargo install mdbook-wavedrom-rs
Then, add the preprocessor to the list of preprocessors in your mdbook
configuration file book.toml
.
# book.toml
[preprocessor.wavedrom]
Afterwards, you should be able to add a wavedrom
codeblock, which should
automatically get replaced by a wavedrom-rs diagram when building the
mdbook.
# Chapter 1
```wavedrom
{
signal: [
{ name: "clk", wave: "p......." },
{ name: "pulses", wave: "0..10.10" },
]
}
```
A WaveDrom skin can be added by adding a path to a skin file in the skin
property.
# book.toml
[preprocessor.wavedrom]
skin = "path/to/skin.json5"