inliners crates.io Build status

Inline images, CSS, JavaScript and more into a single HTML web page. Quite fast. It is mostly influenced by Remi's inliner.

WARNING: Works on my machine notice! This project is a result of playing with rayon and kuchiki so still not feature complete — but can be easily extended.

Features

Install

Use releases page or install from crates.io with cargo: ```sh

By default minifies only HTML:

$ cargo install inliners

If you have Golang installed, allow JS/CSS minification:

$ cargo install inliners --features="esbuild"

Or disable minification at all:

$ cargo install --no-default-features

Then:

$ cd mysite $ inline --no-img --minify index.html > index.min.html

Or:

$ inline --no-js -o ~/archive/wiki/minipig.html https://en.wikipedia.org/wiki/Miniature_pig ```

Usage

``` inline 0.5.0 Inline images, CSS, JavaScript and more into a single HTML web page. Quite fast.

USAGE: inline [FLAGS] [OPTIONS] [input]

FLAGS: -h, --help Prints help information -m, --minify Minify HTML, CSS and JavaScript -C, --no-css Do not process/embedd CSS stylesheets -I, --no-img Do not process/embedd images -J, --no-js Do not process/embedd JavaScript -q, --quiet Silence all output -V, --version Prints version information -v, --verbose Verbose mode (-v, -vv, -vvv)

OPTIONS: -O, --output Output file, stdout if not present -j, --threads Number of threads [default: 40]

ARGS: Input file or URL (index.html, https://example.com/path/) ```

Alternatives

License

MIT/Unlicensed