octopress-minify-html 1.2.3 → 1.2.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 353446441bd8215c7f58475be805aae2085f401c
4
- data.tar.gz: d214183e8f6861d217d336db6577697a92c709cf
3
+ metadata.gz: 37f6dee141459023fd18c66d76b04fee3662f7be
4
+ data.tar.gz: 4a82e978dfaf3beada51da06894b940b8e5d792c
5
5
  SHA512:
6
- metadata.gz: cb56c9d4eb3c5cb551b96db122b6d1e370953fc594e606d08dc83ce005fb268d9333bb87e1e47fc5806ac49be2d62dc7830e5c900f62d9a74a2629c32ec3bd18
7
- data.tar.gz: a90b095fe446250e4ef303db9ed5f26fdb23bf7581755a3a449658fdc4481184fb192ceb896656802859f88ea69c3cd4eec868e3763eb05257aa16c2e93216bd
6
+ metadata.gz: 5ddb37c757afc52dc99a5333fbaa2ad2f2d28a5cf9fde019e24691189b316e28886156ef9ddbee17d0c9aedd99b04b85560652a712c4cb59d7c92a1210cf82e0
7
+ data.tar.gz: bb4ab60002aac4bf8fc4bcb9110fc374b0ef85738a8bb4dfd5a11f63a9b2c70c6c730c1301d7764dd98813c106fc3afd424156feb5ba281afbc346498eced1dc
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ### 1.2.4 (2015-03-23)
4
+
5
+ - Added `html_press` configuration for setting compression options.
6
+
3
7
  ### 1.2.3 (2015-03-09)
4
8
 
5
9
  - Fix: Improved method of checking if a page output will be an HTML page.
data/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
  [![Build Status](https://travis-ci.org/octopress/minify-html.png)](https://travis-ci.org/octopress/minify-html)
5
5
 
6
6
 
7
- Minify Jekyll's HTML output with [html_press](https://github.com/stereobooster/html_press)
7
+ Minify Jekyll's HTML output with [HtmlPress](https://github.com/stereobooster/html_press)
8
8
 
9
9
  ## Installation
10
10
 
@@ -45,6 +45,18 @@ For example, this will disable minification, regardless of your `env` setting.
45
45
  minify_html: false
46
46
  ```
47
47
 
48
+ ## HtmlPress Configuration:
49
+
50
+ You can set configuration options for [HtmlPress](https://github.com/stereobooster/html_press) in your Jekyll configuration like this:
51
+
52
+ ```
53
+ html_press:
54
+ unquoted_attributes: false
55
+ drop_empty_values: false
56
+ strip_crlf: false
57
+ js_minifier_options: false
58
+ ```
59
+
48
60
  ## Contributing
49
61
 
50
62
  1. Fork it
@@ -6,7 +6,8 @@ module Octopress
6
6
  module MinifyHTML
7
7
  class MinifyPage < Hooks::All
8
8
  def post_render(item)
9
- item.output = HtmlPress.press(item.output) if minify?(item)
9
+ options = MinifyHTML.symbolize(item.site.config['html_press'] || {})
10
+ item.output = HtmlPress.press(item.output, options) if minify?(item)
10
11
  end
11
12
 
12
13
  def minify?(item)
@@ -21,9 +22,22 @@ module Octopress
21
22
  end
22
23
  end
23
24
  end
25
+
26
+ def self.symbolize(obj)
27
+ return obj.reduce({}) do |memo, (k, v)|
28
+ memo.tap { |m| m[k.to_sym] = symbolize(v) }
29
+ end if obj.is_a? Hash
30
+
31
+ return obj.reduce([]) do |memo, v|
32
+ memo << symbolize(v); memo
33
+ end if obj.is_a? Array
34
+
35
+ obj
36
+ end
24
37
  end
25
38
  end
26
39
 
40
+
27
41
  if defined? Octopress::Docs
28
42
  Octopress::Docs.add({
29
43
  name: "Octopress Minify HTML",
@@ -1,5 +1,5 @@
1
1
  module Octopress
2
2
  module MinifyHTML
3
- VERSION = "1.2.3"
3
+ VERSION = "1.2.4"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: octopress-minify-html
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.3
4
+ version: 1.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brandon Mathis
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-09 00:00:00.000000000 Z
11
+ date: 2015-03-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -95,7 +95,7 @@ dependencies:
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
97
  - !ruby/object:Gem::Dependency
98
- name: pry-byebug
98
+ name: octopress-debugger
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
101
  - - ">="