Jekyll HTML/XML/CSS/JS Minifier utilising yui-compressor, and htmlcompressor
The jekyll-minifier gem is a tool used for minifying HTML, XML, CSS, JSON, and JavaScript files. It is designed to be easy to use and is compatible with Ruby 2.3 or higher. This gem was created as a CSS3 compatible alternative to the previous minifier, jekyll-press. Feedback is appreciated as the developer is still learning.
To install the jekyll-minifier gem, follow these steps:
gem install jekyll-minifier
_config.yml file:gems:
- jekyll-minifier
jekyll-minifier:
exclude:
- path/to/exclude
jekyll-minifier:
feature1: true
feature2: false
Note: The js_args for JavaScript minification can be found in the uglifier documentation provided at a given link. It is worth mentioning that the implementation of es6 syntax is experimental and is only available via the upstream uglifier package.
The jekyll-minifier gem is a minification tool that can be easily installed and used with Jekyll projects. It supports the minification of various file types and offers features such as exclusions and toggling. The gem is continuously being developed, and feedback is appreciated to improve its functionality.