Project

html5small

0.0
Repository is archived
No commit activity in last 3 years
No release in over 3 years
Minifier for HTML5 documents
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 2.0.0
>= 0

Runtime

>= 4.1.0
>= 1.5.0
 Project Readme

HTML5small

HTML5small is a general-purpose minifier for HTML5 documents.
It is faster than html_compressor and at the same time compresses much better, while still generating valid HTML5.

Usage

$ gem install html5small
require 'html5small'
::HTML5.minify '<html>...</html>'

As a nanoc filter

HTML5small can also be used as a nanoc filter. This will lead to even faster loading of your compiled sites.

To use the HTML5small filter, add this line to your lib/helpers.rb:

require 'html5small/nanoc'

Then adapt your Rules to apply the filter where necessary. For example:

compile '/blog/*/' do
  filter :erb
  filter :html5small
end

Origin

HTML5small is based on h5-min, which is currently unmaintained.