Skip to content

v0.1.0

Choose a tag to compare

@github-actions github-actions released this 14 Oct 11:35
· 20 commits to main since this release

Release 0.1.0 — Initial Public Release

This is the first stable release of mdbook-qr, a preprocessor plugin for mdBook that automatically generates and embeds QR codes in your documentation.


Features

  • Automatic QR Code Generation

    • Creates PNG QR codes using fast-qr.
    • Inserts an <img> tag wherever {{QR_CODE}} appears in a chapter.
  • Configurable Appearance

    • Supports [preprocessor.qr] configuration in book.toml.
    • Adjustable:
      • margin
      • fit.width / fit.height
      • background and module colors (#RRGGBBAA or RGBA arrays)
      • Module shapes (square, circle, diamond, etc.)
  • Custom QR Profiles

    • Define additional markers under [preprocessor.qr.custom.*].
    • Each inherits defaults from [preprocessor.qr] unless overridden.
    • Example:
      [preprocessor.qr.custom.footer]
      marker = "{{QR_FOOTER}}"
      url = "https://github.com/CompEng0001"
      fit.width = 128
      shape.diamond = true
  • Intelligent Path Handling

    • Resolves output image paths relative to each chapter.
    • Normalises Windows/Unix paths for valid HTML output.
  • Warnings & Validation

    • Detects:
      • Missing markers or URLs
      • Duplicate markers
      • Image-path collisions
    • Fails gracefully without breaking the build.

Technical Highlights

  • Built with Rust and designed for mdBook 0.4+
  • Fully documented modules:
    • config – configuration and inheritance
    • html – marker injection
    • preprocessor – mdBook interface
    • util – helper functions
  • Tested on Rust 1.70+

Installation

cargo install mdbook-qr

Then add to your book.toml:

[preprocessor.qr]
enable = true
url = "https://example.com"

Author

CompEng0001