Crates.io | mdbook-tailor |
lib.rs | mdbook-tailor |
version | 0.8.2 |
source | src |
created_at | 2023-03-14 10:24:51.374405 |
updated_at | 2024-09-30 05:37:35.282283 |
description | mdbook preprocessor for image-tailor |
homepage | https://github.com/CoralPink |
repository | https://github.com/CoralPink/mdbook-tailor |
max_upload_size | |
id | 809697 |
size | 110,861 |
This is a preprocessor for mdbook.
We plan to take some more time before a major release 🐣
🔺It includes some issues as noted in Issues.
The following warnings in PageSpeed Insights can be eliminated by using this preprocessor.
Explicitly setting the width and height of image elements will reduce layout deviations and improve CLS.
The image files that this project can handle depend on Imaging library.
It supports PNG
, JPEG
, GIF
, WebP
etc. as generally used in web pages 😉
🔺AVIF is not currently supported.
cargo
to install.cargo install mdbook-tailor
book.toml
.[preprocessor.tailor]
![example](example.webp)
mdbook build
The HTML
generated from the above steps should contain the image size as measured by the mdbook-tailor
.
In addition, a delayed loading setting will be added!
<img src="example.webp" alt="example" width="789" height="456" loading="lazy">
This is actually a site I am producing myself ☺️
Licensed under either of
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.