Module: Jekyll::MinifyHTML
- Included in:
- ConvertiblePage, Page, Post
- Defined in:
- lib/jekyll-minify-html.rb
Instance Method Summary collapse
Instance Method Details
#output_file(dest, content) ⇒ Object
5 6 7 8 9 10 |
# File 'lib/jekyll-minify-html.rb', line 5 def output_file(dest, content) FileUtils.mkdir_p(File.dirname(dest)) File.open(dest, 'w') do |f| f.write(content) end end |
#output_html(path, content) ⇒ Object
12 13 14 15 16 17 |
# File 'lib/jekyll-minify-html.rb', line 12 def output_html(path, content) if @site.config['env'] && @site.config['env'].downcase === 'production' content = HtmlPress.press(content) end output_file(path, content) end |