Crates.io | mdbook-image-size |
lib.rs | mdbook-image-size |
version | 0.2.1 |
source | src |
created_at | 2023-11-27 14:16:37.496286 |
updated_at | 2024-07-18 07:49:38.259496 |
description | A mdbook preprocessor which support image size syntax |
homepage | |
repository | https://github.com/lhybdv/mdbook-image-size.git |
max_upload_size | |
id | 1050462 |
size | 66,855 |
A mdbook preprocessor which support image size syntax
From
![the alt](path/to/your/image "the title" =500x400)
To
<p><img src="path/to/your/image" alt="the alt" title="the title" width="500" height="400"></p>
From
![the alt](path/to/your/image "the title" =500x)
To
<p><img src="path/to/your/image" alt="the alt" title="the title" width="500"></p>
From
![the alt](path/to/your/image "the title" =x400)
To
<p><img src="path/to/your/image" alt="the alt" title="the title" height="400"></p>
[!TIP] No alt or title is ok.
left is default
From
![the alt](path/to/your/image "the title" =500x400 center)
To
<p style="text-align:center"><img src="path/to/your/image" alt="the alt" title="the title" width="500" height="400"></p>
From
![the alt](path/to/your/image "the title" =500x400 right)
To
<p style="text-align:right"><img src="path/to/your/image" alt="the alt" title="the title" width="500" height="400"></p>
cargo install mdbook-image-size
add it as a preprocessor in book.toml
[preprocessor.image-size]
command = "mdbook-image-size"