Sha256: 993e27fb885ba0ff85618f6dc35abd7beab5475b8d1e58c74c4b4e4362272cfa
Contents?: true
Size: 324 Bytes
Versions: 205
Compression:
Stored size: 324 Bytes
Contents
require "zlib" class GzipFilter < Nanoc::Filter identifier :gzip type text: :binary def run(content, params = {}) Zlib::GzipWriter.open(output_filename, Zlib::BEST_COMPRESSION) do |gz| gz.orig_name = "index.html" gz.mtime = File.mtime(item[:filename]).to_i gz.write content end end end
Version data entries
205 entries across 205 versions & 1 rubygems