jekyll-minifier

Jekyll HTML/XML/CSS/JS Minifier utilising yui-compressor, and htmlcompressor

GPL-3.0 License

Downloads
477K
Stars
243
Committers
12

jekyll-minifier Build Status Gem Version

Requires Ruby 2.3+

Minifies HTML, XML, CSS, JSON and JavaScript both inline and as separate files utilising yui-compressor and htmlcompressor.

This was created due to the previous minifier (jekyll-press) not being CSS3 compatible, which made me frown.

Note: this is my first ever gem, I'm learning, so feedback is much appreciated.

** This minifier now only runs when JEKYLL_ENV="production" is set in the environment **

Easy to use, just install the jekyll-minifier gem:

Then add this to your _config.yml:

Optionally, you can also add exclusions using:

and toggle features and settings using:

js_args can be found in the the uglifier documentation at listed below

Note: es6 has been implemented as experimental only via the upstream uglifier package. See https://github.com/lautis/uglifier for more information.

To enable es6 syntax use:

Like my stuff?

Would you like to buy me a coffee or send me a tip? While it's not expected, I would really appreciate it.