jekyll-responsive-magick 1.0.3 → 1.1.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 +4 -4
- data/lib/jekyll-responsive-magick.rb +7 -2
- metadata +8 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fe6a2b534263046bdb35654cecae1276d18df445e46e8281b00427bebc47ec35
|
4
|
+
data.tar.gz: 74ad95f2d1b12dca9ef51647f4caf23e8a5a08f0d3c79563981cd49f16f07fd9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fa9b5ff4268b73ad964a02a179973be1bc967626c66c9881c238aaf4d44c9261d95d310bc27d2b4a591fd7a9a59785eee115ee8a1afe2e7aaf5343a56cb7cb95
|
7
|
+
data.tar.gz: 3a21631ecd2128185c5bdb0ae90332b3b72466bbfbe232a7303ed8c6ba9e1a092178a2dc9b19fdbe62130f256a906d67840ca73568741e0a846a370fabb77925
|
@@ -18,6 +18,7 @@
|
|
18
18
|
## limitations under the License.
|
19
19
|
##
|
20
20
|
require 'fileutils'
|
21
|
+
require 'shellwords'
|
21
22
|
|
22
23
|
module Jekyll
|
23
24
|
module ResponsiveMagickFilter
|
@@ -53,7 +54,7 @@ module Jekyll
|
|
53
54
|
srcwidth = width(input)
|
54
55
|
srcset = ["#{input} #{srcwidth}w"]
|
55
56
|
|
56
|
-
if File.exist?(src) and ['.jpg', '.jpeg', '.png', '.gif'].include?(extname)
|
57
|
+
if File.exist?(src) and ['.jpg', '.jpeg', '.png', '.apng', '.gif'].include?(extname)
|
57
58
|
dest = site.dest
|
58
59
|
if site.config['responsive']['widths']
|
59
60
|
widths = site.config['responsive']['widths']
|
@@ -80,7 +81,11 @@ module Jekyll
|
|
80
81
|
site.static_files << StaticFile.new(site, "_responsive", dirname, file)
|
81
82
|
if not File.exist?(dst) or File.mtime(src) > File.mtime(dst)
|
82
83
|
FileUtils.mkdir_p(File.dirname(dst))
|
83
|
-
|
84
|
+
if extname == '.apng'
|
85
|
+
cmd = "convert apng:#{src.shellescape} -strip -quality #{quality} -resize #{width} #{dst.shellescape}"
|
86
|
+
else
|
87
|
+
cmd = "convert #{src.shellescape} -strip -quality #{quality} -resize #{width} #{dst.shellescape}"
|
88
|
+
end
|
84
89
|
if verbose
|
85
90
|
print("#{cmd}\n")
|
86
91
|
end
|
metadata
CHANGED
@@ -1,20 +1,21 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-responsive-magick
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lawrence Murray
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-11-
|
11
|
+
date: 2022-11-27 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: A Jekyll plugin for responsive images. Adds filters for setting the srcset,
|
14
14
|
width and height attributes of HTML img elements, while automatically generating
|
15
15
|
image variants of configured sizes using the ImageMagick command-line tools. Resized
|
16
16
|
images are cached to minimize build times, regenerated only when the original source
|
17
|
-
image changes.
|
17
|
+
image changes. Supported image file formats are JPEG, PNG, GIF (including animated),
|
18
|
+
and APNG.
|
18
19
|
email: lawrence@indii.org
|
19
20
|
executables: []
|
20
21
|
extensions: []
|
@@ -25,7 +26,10 @@ files:
|
|
25
26
|
homepage: https://indii.org/software/jekyll-responsive-magick
|
26
27
|
licenses:
|
27
28
|
- Apache-2.0
|
28
|
-
metadata:
|
29
|
+
metadata:
|
30
|
+
bug_tracker_uri: https://github.com/lawmurray/jekyll-responsive-magick/issues
|
31
|
+
homepage_uri: https://indii.org/software/jekyll-responsive-magick
|
32
|
+
source_code_uri: https://github.com/lawmurray/jekyll-responsive-magick
|
29
33
|
post_install_message:
|
30
34
|
rdoc_options: []
|
31
35
|
require_paths:
|