module Jekyll::Tidy
Constants
- VERSION
Public Class Methods
compress_output?()
click to toggle source
# File lib/jekyll/tidy.rb, line 23 def self.compress_output? jekyll_config["jekyll_tidy"] && jekyll_config["jekyll_tidy"]["compress_html"] end
exclude?(path, override = {})
click to toggle source
# File lib/jekyll/tidy.rb, line 17 def self.exclude?(path, override = {}) config = jekyll_config.merge(override) exclude_paths = config["jekyll_tidy"] && config["jekyll_tidy"]["exclude"] exclude_paths.to_a.any? { |exclude| File.fnmatch(exclude, path) } end
ignore_env?()
click to toggle source
# File lib/jekyll/tidy.rb, line 35 def self.ignore_env? Jekyll.env == (jekyll_config["jekyll_tidy"] && jekyll_config["jekyll_tidy"]["ignore_env"]) end
init(site)
click to toggle source
# File lib/jekyll/tidy.rb, line 9 def self.init(site) @JEKYLL_CONFIG = site.config end
jekyll_config()
click to toggle source
# File lib/jekyll/tidy.rb, line 13 def self.jekyll_config @JEKYLL_CONFIG || Jekyll.configuration({}) end
output_clean(output, compress = false)
click to toggle source
# File lib/jekyll/tidy.rb, line 27 def self.output_clean(output, compress = false) if compress return HtmlCompressor::Compressor.new.compress output else return HtmlBeautifier.beautify output end end