2 unstable releases
0.2.1 | Jul 18, 2024 |
---|---|
0.1.0 | Nov 27, 2023 |
#1389 in Text processing
87 downloads per month
19KB
230 lines
mdbook-image-size
A mdbook preprocessor which support image size syntax
size
width & height
From

To
<p><img src="path/to/your/image" alt="the alt" title="the title" width="500" height="400"></p>
width only
From

To
<p><img src="path/to/your/image" alt="the alt" title="the title" width="500"></p>
height only
From

To
<p><img src="path/to/your/image" alt="the alt" title="the title" height="400"></p>
[!TIP] No alt or title is ok.
align
left
left is default
center
From

To
<p style="text-align:center"><img src="path/to/your/image" alt="the alt" title="the title" width="500" height="400"></p>
right
From

To
<p style="text-align:right"><img src="path/to/your/image" alt="the alt" title="the title" width="500" height="400"></p>
Installation
cargo install mdbook-image-size
add it as a preprocessor in book.toml
[preprocessor.image-size]
command = "mdbook-image-size"
Dependencies
~13–25MB
~371K SLoC