jekyll_picture_tag 2.1.0 → 2.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/code-checks.yml +2 -5
- data/docs/devs/releases.md +5 -0
- data/docs/index.md +1 -1
- data/docs/logo.png +0 -0
- data/docs/users/notes/html_attributes.md +2 -2
- data/jekyll_picture_tag.gemspec +1 -1
- data/lib/jekyll_picture_tag/images/image_file.rb +9 -3
- data/lib/jekyll_picture_tag/version.rb +1 -1
- data/readme.md +11 -27
- metadata +4 -5
- data/docs/logo.svg +0 -880
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9c2eba1d97111de1ef819824525ee40dadc297235b0d9a723e50292aca614277
|
4
|
+
data.tar.gz: 2b50ae28f44441be8b41329cc488d99afb68954f13b3292af1bac90e1cbc9fad
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8b9be36209c87b8475377e7f76117f1d0ac042d885f10e46f49a757d18af751a5df4953b2bd85ebbe94af77fd878e8a425394e713c181573e71d2c00c53be8f0
|
7
|
+
data.tar.gz: 1c7a556b2f1bc1b0a29010e9c7a8c484df86b049ac0247d831b23b7c58478f3b0a54a07df014b126af727d4f110677f0c366a83712b9f10b8229b3b9dbb7f8eb
|
@@ -2,12 +2,9 @@ name: 'Tests & Formatting'
|
|
2
2
|
|
3
3
|
on:
|
4
4
|
push:
|
5
|
-
branches: [
|
5
|
+
branches: [master]
|
6
6
|
pull_request:
|
7
|
-
branches: [
|
8
|
-
schedule:
|
9
|
-
# Run weekly; github deletes caches that haven't been used in a week.
|
10
|
-
- cron: '0 0 * * 0'
|
7
|
+
branches: [master]
|
11
8
|
|
12
9
|
jobs:
|
13
10
|
checks:
|
data/docs/devs/releases.md
CHANGED
@@ -2,6 +2,11 @@
|
|
2
2
|
---
|
3
3
|
# Release History
|
4
4
|
|
5
|
+
* 2.1.2 13 September, 2024
|
6
|
+
* Remove overly specific version spec for ruby-vips - thanks to [@hschne](https://github.com/hschne) for [#313](https://github.com/rbuchberger/jekyll_picture_tag/pull/313)
|
7
|
+
* 2.1.1 20 July, 2024
|
8
|
+
* Don't provide Q setting for PPM images - thanks to @dichiban for [#309](https://github.com/rbuchberger/jekyll_picture_tag/pull/309)
|
9
|
+
* Fix alpha premultiplication - thanks to @KaarlisCaune for [#302](https://github.com/rbuchberger/jekyll_picture_tag/pull/302)
|
5
10
|
* 2.1.0 29 January, 2024
|
6
11
|
* Check whether the vips CLI is installed before trying to use it. Thanks to @philrb for
|
7
12
|
[#299](https://github.com/rbuchberger/jekyll_picture_tag/pull/299)
|
data/docs/index.md
CHANGED
data/docs/logo.png
CHANGED
Binary file
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# HTML attributes
|
2
2
|
|
3
3
|
Jekyll Picture Tag has comprehensive attribute support for all generated HTML. You can add
|
4
|
-
attributes both through the [liquid tag](
|
5
|
-
and the [preset](
|
4
|
+
attributes both through the [liquid tag](../liquid_tag/index.md),
|
5
|
+
and the [preset](../presets/html_attributes.md) (scroll down a bit).
|
data/jekyll_picture_tag.gemspec
CHANGED
@@ -38,7 +38,7 @@ Gem::Specification.new do |spec|
|
|
38
38
|
# rainbow is used to colorize terminal output.
|
39
39
|
spec.add_runtime_dependency 'rainbow', '~> 3.0'
|
40
40
|
# ruby-vips interfaces with libvips.
|
41
|
-
spec.add_runtime_dependency 'ruby-vips', '~> 2.
|
41
|
+
spec.add_runtime_dependency 'ruby-vips', '~> 2.2'
|
42
42
|
|
43
43
|
# libvips handles all image processing operations.
|
44
44
|
spec.requirements << 'libvips'
|
@@ -57,9 +57,9 @@ module PictureTag
|
|
57
57
|
|
58
58
|
opts[:strip] = PictureTag.preset['strip_metadata']
|
59
59
|
|
60
|
-
# gifs don't accept a quality setting, and PNGs don't on older versions of
|
60
|
+
# gifs don't accept a quality setting, and PNGs and PPMs don't on older versions of
|
61
61
|
# vips. Since it's not remarkably useful anyway, we'll ignore them.
|
62
|
-
opts[quality_key] = base.quality unless %w[gif png].include? base.format
|
62
|
+
opts[quality_key] = base.quality unless %w[gif png ppm].include? base.format
|
63
63
|
|
64
64
|
opts.transform_keys(&:to_sym)
|
65
65
|
end
|
@@ -86,7 +86,13 @@ module PictureTag
|
|
86
86
|
end
|
87
87
|
|
88
88
|
def resize(image)
|
89
|
-
image.
|
89
|
+
if image.has_alpha?
|
90
|
+
image = image.premultiply
|
91
|
+
image = image.resize(scale_value)
|
92
|
+
image.unpremultiply
|
93
|
+
else
|
94
|
+
image.resize(scale_value)
|
95
|
+
end
|
90
96
|
end
|
91
97
|
|
92
98
|
def crop(image)
|
data/readme.md
CHANGED
@@ -1,31 +1,18 @@
|
|
1
1
|
# Jekyll Picture Tag
|
2
2
|
|
3
|
-
## Help Wanted
|
4
|
-
|
5
|
-
My life just got a lot busier; I'd really like a maintainer or two to help. I'm not abandoning JPT,
|
6
|
-
I just don't have a ton of time to put into hacking on it.
|
7
|
-
|
8
|
-
If you've been learning Ruby and you want to move beyond tutorials and throwaway projects, I'd love
|
9
|
-
to hear from you. I'd be happy to help you gain experience and credibility, if you're willing to
|
10
|
-
help me maintain this project!
|
11
|
-
|
12
|
-
If you're interested, contact me: robert@buchberger.cc
|
13
|
-
|
14
|
-
![Logo](docs/logo.svg)
|
15
|
-
|
16
|
-
![Tests & Formatting](https://github.com/rbuchberger/jekyll_picture_tag/workflows/Tests%20&%20Formatting/badge.svg)
|
17
|
-
|
18
3
|
**Responsive Images done correctly.**
|
19
4
|
|
20
|
-
|
21
|
-
different browsers and devices is tedious and tricky. Tedious, tricky things should be automated.
|
22
|
-
[This blog post further elaborates on that theme.](https://robert-buchberger.com/blog/2021/responsive_images.html)
|
5
|
+
![Logo](docs/logo.png)
|
23
6
|
|
24
7
|
Jekyll Picture Tag automatically builds cropped, resized, and reformatted images, builds several
|
25
8
|
kinds of markup, offers extensive configuration while requiring none, and solves both the art
|
26
9
|
direction and resolution switching problems with a little YAML configuration and a simple template
|
27
10
|
tag.
|
28
11
|
|
12
|
+
It's simple to throw a photo on a page and call it a day, but doing justice to users on all
|
13
|
+
different browsers and devices is tedious and tricky.
|
14
|
+
[Tedious, tricky things should be automated](https://robert-buchberger.com/blog/2021/responsive_images.html).
|
15
|
+
|
29
16
|
## Why use Responsive Images?
|
30
17
|
|
31
18
|
**Performance:** The fastest sites are static sites, but if you plonk a 2mb picture of your dog at
|
@@ -59,8 +46,13 @@ Tag is your responsive images minion - give it simple instructions and it'll han
|
|
59
46
|
|
60
47
|
Recent releases:
|
61
48
|
|
49
|
+
* 2.1.2 13 September, 2024
|
50
|
+
* Remove overly specific version spec for ruby-vips - thanks to [@hschne](https://github.com/hschne) for [#313](https://github.com/rbuchberger/jekyll_picture_tag/pull/313)
|
51
|
+
* 2.1.1 20 July, 2024
|
52
|
+
* Don't provide Q setting for PPM images - thanks to [@dichiban](https://github.com/dichiban) for [#309](https://github.com/rbuchberger/jekyll_picture_tag/pull/309)
|
53
|
+
* Fix alpha premultiplication - thanks to [@KaarlisCaune](https://github.com/kaarliscaune) for [#302](https://github.com/rbuchberger/jekyll_picture_tag/pull/302)
|
62
54
|
* 2.1.0 29 January, 2024
|
63
|
-
* Check whether the vips CLI is installed before trying to use it. Thanks to @philrb for
|
55
|
+
* Check whether the vips CLI is installed before trying to use it. Thanks to [@philrb](https://github.com/philrb) for
|
64
56
|
[#299](https://github.com/rbuchberger/jekyll_picture_tag/pull/299)
|
65
57
|
* Update minimum required mocha version to maintain compatibility with minitest
|
66
58
|
* 2.0.4 August 16, 2022
|
@@ -100,11 +92,3 @@ Recent releases:
|
|
100
92
|
* Drop support for `markup_presets` and `media_presets`. They are now
|
101
93
|
officially and only `presets` and `media_queries`.
|
102
94
|
* Improve docs with an introductory tutorial and 'how-to' flow.
|
103
|
-
|
104
|
-
## Help Wanted
|
105
|
-
|
106
|
-
Writing code is only part of the job; often the harder part is knowing what needs to be changed. Any
|
107
|
-
and all feedback is greatly appreciated, especially in regards to documentation. What are your pain
|
108
|
-
points? See the [contributing
|
109
|
-
guidelines](https://rbuchberger.github.io/jekyll_picture_tag/devs/contributing), or the
|
110
|
-
[issues](https://github.com/rbuchberger/jekyll_picture_tag/issues) page for more.
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll_picture_tag
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Robert Wierzbowski
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2024-
|
13
|
+
date: 2024-09-13 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: addressable
|
@@ -88,14 +88,14 @@ dependencies:
|
|
88
88
|
requirements:
|
89
89
|
- - "~>"
|
90
90
|
- !ruby/object:Gem::Version
|
91
|
-
version: 2.
|
91
|
+
version: '2.2'
|
92
92
|
type: :runtime
|
93
93
|
prerelease: false
|
94
94
|
version_requirements: !ruby/object:Gem::Requirement
|
95
95
|
requirements:
|
96
96
|
- - "~>"
|
97
97
|
- !ruby/object:Gem::Version
|
98
|
-
version: 2.
|
98
|
+
version: '2.2'
|
99
99
|
- !ruby/object:Gem::Dependency
|
100
100
|
name: bundler
|
101
101
|
requirement: !ruby/object:Gem::Requirement
|
@@ -311,7 +311,6 @@ files:
|
|
311
311
|
- docs/devs/releases.md
|
312
312
|
- docs/index.md
|
313
313
|
- docs/logo.png
|
314
|
-
- docs/logo.svg
|
315
314
|
- docs/users/configuration/directories.md
|
316
315
|
- docs/users/configuration/disable.md
|
317
316
|
- docs/users/configuration/fast_build.md
|