This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Htmlcompressor < Nanoc3::Filter | |
identifier :htmlcompressor | |
type :text => :binary | |
def run(content, params={}) | |
case @item[:extension] | |
when "xml.erb" | |
cmd = "htmlcompressor --type xml -o #{output_filename}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Optipng < Nanoc3::Filter | |
identifier :optipng | |
type :binary | |
def run(filename, params={}) | |
system( | |
'optipng', | |
'-quiet', | |
'-o', params[:level].to_s, | |
filename, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Smusher < Nanoc3::Filter | |
identifier :smusher | |
type :binary | |
# "output_finename" | |
def run(filename, params={}) | |
system( |