octopress-minify-html 1.2.1 → 1.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/octopress-minify-html.rb +11 -5
- data/lib/octopress-minify-html/version.rb +1 -1
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 15911b5abb878de4c25afe9738b80634eadf8184
|
4
|
+
data.tar.gz: 0a03fb37a8f05c04445478570fd9bb9050649176
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 471871685631817c4e06cc4f588ae86db7d89968482fb5e92dfc645b33e997c83304e001a03dd2c855241a139b3770760d80c7b156b0cdb0ac510b8d6e2de12d
|
7
|
+
data.tar.gz: 8ad301154ba97a7f546f917ad8b45c0d3a28d3cc35fa0fd2e8283debbe0b77db0e02435d4680eb3111f947ada72fb874f5aa1bf054870efc60e623b89dbc1aec
|
data/CHANGELOG.md
CHANGED
@@ -6,13 +6,19 @@ 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
|
+
item.output = HtmlPress.press(item.output) if minify?(item)
|
10
10
|
end
|
11
11
|
|
12
|
-
def minify?(
|
13
|
-
|
14
|
-
|
15
|
-
|
12
|
+
def minify?(item)
|
13
|
+
if item.url.end_with?('html')
|
14
|
+
config = item.site.config
|
15
|
+
minify = config['minify_html']
|
16
|
+
production = config['env'].nil? || config['env'] =~ /production/i
|
17
|
+
|
18
|
+
# Minify if configuration explicitly requires minification
|
19
|
+
# or if Jekyll env is production
|
20
|
+
minify || (minify.nil? && production)
|
21
|
+
end
|
16
22
|
end
|
17
23
|
end
|
18
24
|
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.
|
4
|
+
version: 1.2.2
|
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-
|
11
|
+
date: 2015-02-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -94,6 +94,20 @@ dependencies:
|
|
94
94
|
- - ">="
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: pry-byebug
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
97
111
|
description: Minify Jekyll's HTML output using html_press
|
98
112
|
email:
|
99
113
|
- brandon@imathis.com
|