Crates.io | inliners |
lib.rs | inliners |
version | 0.5.0 |
source | src |
created_at | 2021-03-25 18:00:19.790951 |
updated_at | 2021-03-25 18:00:19.790951 |
description | Inline images, CSS, JavaScript and more into a single HTML web page. Quite fast. |
homepage | https://github.com/makovich/inliners |
repository | https://github.com/makovich/inliners |
max_upload_size | |
id | 373498 |
size | 104,040 |
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.
-j THREADS
switch)@import
, <style />
or <tag style="..."
)<img src="i.jpg"/>
, div { background-image: url('img/i.png'); }
)Use releases page or install from crates.io with cargo
:
# 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
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> Output file, stdout if not present
-j, --threads <threads> Number of threads [default: 40]
ARGS:
<input> Input file or URL (index.html, https://example.com/path/)
MIT/Unlicensed