jekyll-responsive-image 1.3.0 → 1.3.1
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4d96470c65f56cdb89f7eda561121f6c3dd995f5
|
4
|
+
data.tar.gz: a6a171801da274fac6c506a2786dd42e59c2325b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bbeb2236d35f4dcd35723b6cb2ce76f9b11b2bde06b0669667f23477188077e7b068460d06a924aa7272008ec156ea4cb3bc7921e0d52a70ebb825facf3abaa6
|
7
|
+
data.tar.gz: 1842d070bab2a9912c36e318d83432c3483a5a242cfab69e827f70e2d9070c093c4da6f0b300c4989d27cea91dddc142dbbe5c29c54e7ee8ed7a8b60db94c6ec
|
@@ -22,23 +22,31 @@ module Jekyll
|
|
22
22
|
site_source_filepath = File.expand_path(filepath, config[:site_source])
|
23
23
|
site_dest_filepath = File.expand_path(filepath, config[:site_dest])
|
24
24
|
|
25
|
+
if config['save_to_source']
|
26
|
+
target_filepath = site_source_filepath
|
27
|
+
else
|
28
|
+
target_filepath = site_dest_filepath
|
29
|
+
end
|
30
|
+
|
25
31
|
# Don't resize images more than once
|
26
|
-
next if File.exist?(
|
32
|
+
next if File.exist?(target_filepath)
|
27
33
|
|
28
|
-
ensure_output_dir_exists!(
|
34
|
+
ensure_output_dir_exists!(target_filepath)
|
29
35
|
ensure_output_dir_exists!(site_dest_filepath)
|
30
36
|
|
31
|
-
Jekyll.logger.info "Generating #{
|
37
|
+
Jekyll.logger.info "Generating #{target_filepath}"
|
32
38
|
|
33
39
|
i = img.scale(ratio)
|
34
|
-
i.write(
|
40
|
+
i.write(target_filepath) do |f|
|
35
41
|
f.interlace = i.interlace
|
36
42
|
f.quality = size['quality'] || config['default_quality']
|
37
43
|
end
|
38
44
|
|
39
|
-
|
40
|
-
|
41
|
-
|
45
|
+
if config['save_to_source']
|
46
|
+
# Ensure the generated file is copied to the _site directory
|
47
|
+
Jekyll.logger.info "Copying resized image to #{site_dest_filepath}"
|
48
|
+
FileUtils.copy_file(site_source_filepath, site_dest_filepath)
|
49
|
+
end
|
42
50
|
|
43
51
|
i.destroy!
|
44
52
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-responsive-image
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joseph Wynn
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-07-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|
@@ -90,7 +90,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
90
90
|
version: '0'
|
91
91
|
requirements: []
|
92
92
|
rubyforge_project:
|
93
|
-
rubygems_version: 2.6.
|
93
|
+
rubygems_version: 2.6.8
|
94
94
|
signing_key:
|
95
95
|
specification_version: 4
|
96
96
|
summary: Responsive image management for Jekyll
|