Skip to content

lhybdv/mdbook-image-size

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mdbook-image-size

A mdbook preprocessor which support image size syntax

size

width & height

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>

width only

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> 

height only

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.

align

left

left is default

center

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>

right

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>

Installation

cargo install mdbook-image-size

add it as a preprocessor in book.toml

[preprocessor.image-size]
command = "mdbook-image-size"

About

A mdbook preprocessor which support image size syntax

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages