-
-
Save bobthecow/1945051 to your computer and use it in GitHub Desktop.
HTML COMPRESSOR
This file contains 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
require 'html_compressor' | |
class HtmlCompressor < Nanoc3::Filter | |
identifier :html_compressor | |
# Runs the content through htmlcompressor. | |
# | |
# This method optionally takes options to pass directly to htmlcompressor | |
# | |
# @param [String] content The content to filter | |
# | |
# @param [Hash] params Options passed to htmlcompressor | |
# | |
# @return [String] The filtered content | |
def run(content, params={}) | |
compressor = HtmlCompressor::HtmlCompressor.new(params) | |
compressor.compress(content) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Options are: