| Crates.io | mdbook-qr |
| lib.rs | mdbook-qr |
| version | 1.0.0 |
| created_at | 2025-10-14 11:39:12.670734+00 |
| updated_at | 2026-01-15 08:17:39.037215+00 |
| description | An mdBook preprocessor that generates a QR code using fast_qr. |
| homepage | |
| repository | https://github.com/CompEng0001/mdbook-qr |
| max_upload_size | |
| id | 1882124 |
| size | 267,011 |
An mdBook preprocessor that generates and embeds a QR code for your book, powered by fast-qr.
It produces a PNG image during the build and replaces {{QR_CODE}} markers in chapters with an <img> tag pointing to the generated QR code.
Read the documentation here, to see the actual examples in action.
fast-qr[preprocessor.qr] with sub-tables:
<img> tag[preprocessor.qr.custom.*] (see Custom Configuration)From crates.io:
cargo install mdbook-qr
From source (in this repository):
cargo install --path .
Ensure the mdbook-qr binary is available on your PATH.
Add to your book.toml:
[preprocessor.qr]
enable = true
url = "https://example.com"
qr-path = "src/qr.png"
margin = 2
background = "#FFFFFFFF"
module = "#000000FF"
[preprocessor.qr.fit]
width = 256
height = 256
[preprocessor.qr.shape]
circle = true
Then, in any Markdown file:
{{QR_CODE}}
During the build, this is replaced with:
<img src="./qr.png" alt="QR code" style="width:256px;height:256px;" loading="eager">
...and rendered as:

Licensed under the MIT License