Welcome to mdbook-qr
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.
Compatibility
| mdbook-qr version | mdbook versions | Notes |
|---|---|---|
| v1.*.* | v0.5.* | Requires API changes introduced in mdbook 0.5.* |
| v0.*.* | v0.4.* | Not compatible with 0.5.*+ |
For all options see Documentation chapter.
Live Configuration Example
As seen from this page the current preprocessor configuration is:
[preprocessor.qr]
enable = true
qr-path = "figures/mdbook-qr-code.png"
margin = 1
shape.rectangle = true
background = "#FFFFFFFF"
module = "#000000FF"
Then, in any Markdown file:
{{QR_CODE}}
During the build, this is replaced with:
<img src="./figures/mdbook-qr-code.png?" alt="QR code" style="height:200px;width:200px" loading="eager">
…and rendered as: