jekyll-imgwh 1.2.0 → 1.3.0
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/README.md +204 -0
- data/lib/jekyll/imgwh/helpers.rb +47 -0
- data/lib/jekyll/imgwh/tag.rb +64 -0
- data/lib/{jekyll-imgwh → jekyll/imgwh}/version.rb +1 -1
- data/lib/jekyll-imgwh.rb +8 -104
- metadata +10 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '039fab28cf4794e19d2f2d706fe5cba88ac46b13c9330d06308a50f4078382e3'
|
4
|
+
data.tar.gz: 18ed412a7b4cfbebbf1a424022df307691303ac5b067c758d22246214be8140e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3c215031cc7b9895731e059b14015dc10e5a565f1d29d2434e3e5b47224b851a09e068753ef5770fd16ef41f714d144d77ebdc31234abb85200f0f58617c7e77
|
7
|
+
data.tar.gz: 972b7d444f27c163706b5527c22615bdddc6f0889d69460af73e0e950b6bd077d4325292cd51301ec1673ba66824108544fd7be29a178e62c8b00a7c199f69b8
|
data/README.md
ADDED
@@ -0,0 +1,204 @@
|
|
1
|
+
[](https://badge.fury.io/rb/jekyll-imgwh)
|
2
|
+
|
3
|
+
A [Jekyll](https://jekyllrb.com/) plugin to simplify maintenance of the images on the site.
|
4
|
+
|
5
|
+
It provides a [Liquid tag `imgwh`](#liquid-tag) for `<img>` elements, which ensures image still exists and automatically fills `width` and `height` attributes allowing image to take up space before it loads, to mitigate content layout shifts.
|
6
|
+
|
7
|
+
It also provides a [Liquid filter `imgwh`](#liquid-filter), which returns image size as an array.
|
8
|
+
|
9
|
+
# Installation
|
10
|
+
|
11
|
+
Add preferred variant from the following ones to your site's `Gemfile` and run `bundle install`:
|
12
|
+
|
13
|
+
```ruby
|
14
|
+
gem "jekyll-imgwh", group: :jekyll_plugins
|
15
|
+
gem "jekyll-imgwh", group: :jekyll_plugins, git: "https://github.com/ojuuji/jekyll-imgwh"
|
16
|
+
gem "jekyll-imgwh", group: :jekyll_plugins, path: "/local/path/to/jekyll-imgwh"
|
17
|
+
```
|
18
|
+
|
19
|
+
# Usage
|
20
|
+
|
21
|
+
## Liquid Tag
|
22
|
+
|
23
|
+
This plugin exposes Liquid tag `imgwh` with the following syntax:
|
24
|
+
|
25
|
+
```liquid
|
26
|
+
{% imgwh <src> [<rest>] %}
|
27
|
+
```
|
28
|
+
|
29
|
+
i.e. `<src>` is required and `<rest>` is optional. They both can include Liquid markup.
|
30
|
+
|
31
|
+
After rendering, `<rest>` is added to generated HTML `<img>` element as-is, and `<src>` is used as a value for `src` attribute.
|
32
|
+
|
33
|
+
Plugin extracts size of the referenced image and automatically sets `width` and `height` attributes in the generated HTML `<img>` element.
|
34
|
+
|
35
|
+
Extra whitespace around `<src>` and `<rest>` is stripped.
|
36
|
+
|
37
|
+
Example:
|
38
|
+
|
39
|
+
```liquid
|
40
|
+
{% imgwh "/assets/{{ site.title | slugify }}.png" alt="{{ site.title }}" %}
|
41
|
+
```
|
42
|
+
|
43
|
+
with `site.title="My Site"` and image size 200x67 it would generate the following HTML `<img>` element:
|
44
|
+
|
45
|
+
```html
|
46
|
+
<img src="/assets/my-site.png" width="200" height="67" alt="My Site">
|
47
|
+
```
|
48
|
+
|
49
|
+
### Quotes and Whitespace
|
50
|
+
|
51
|
+
`<src>` can be specified with single quotes, double quotes, or without quotes. This also defines quotation for the generated `src`, `width`, and `height` attributes: they always use the same quotes as `<src>`:
|
52
|
+
|
53
|
+
```
|
54
|
+
{% imgwh "/foo.png" %} -> <img src="/foo.png" width="123" height="456">
|
55
|
+
{% imgwh '/foo.png' %} -> <img src='/foo.png' width='123' height='456'>
|
56
|
+
{% imgwh /foo.png %} -> <img src=/foo.png width=123 height=456>
|
57
|
+
```
|
58
|
+
|
59
|
+
Whitespace can be freely used in single- and double-quoted `<src>`. To use the same quote character in the `<src>` value specify it twice:
|
60
|
+
|
61
|
+
```
|
62
|
+
{% imgwh "/f{{ 'oo' | append: "".png"" }}" %} -> OK (src="/foo.png")
|
63
|
+
{% imgwh "/f{{ 'oo' | append: ".png" }}" %} -> ERROR
|
64
|
+
{% imgwh '/f{{ 'oo' | append: ".png" }}' %} -> ERROR
|
65
|
+
{% imgwh '/f{{ ''oo'' | append: ".png" }}' %} -> OK (src='/foo.png')
|
66
|
+
```
|
67
|
+
|
68
|
+
For unquoted `<src>` whitespace is allowed only within Liquid filters (i.e. between `{{` and `}}`):
|
69
|
+
|
70
|
+
```
|
71
|
+
{% imgwh /f{{ 'oo' | append: ".png" }} %} -> OK (src=/foo.png)
|
72
|
+
{% imgwh /My Site.png %} -> ERROR (tries to open "/My" image)
|
73
|
+
{% imgwh /{{ site.title }}.png %} -> OK (src=/My Site.png)
|
74
|
+
```
|
75
|
+
|
76
|
+
Note, in the last example, although plugin did not fire an error, generated `src` attribute is not valid (`<img>` element would use `src=/My`). After rendering Liquid markup in the `<src>` value, plugin does not perform any further normalization for the resulting URI. It is up to the caller to provide correct URI. Plugin only extracts and URL-decodes the path from it.
|
77
|
+
|
78
|
+
## Liquid Filter
|
79
|
+
|
80
|
+
This plugin exposes a Liquid filter `imgwh`, which returns image size as an array.
|
81
|
+
|
82
|
+
It accepts no extra arguments and follows the same [path resolution](#path-resolution) rules as the tag.
|
83
|
+
|
84
|
+
For example, if `/assets/images/logo.png` size is 520x348, this template
|
85
|
+
|
86
|
+
```liquid
|
87
|
+
<pre>
|
88
|
+
{{ "/assets/images/logo.png" | imgwh | inspect }}
|
89
|
+
{{ "/assets/images/logo.png" | imgwh | first }}
|
90
|
+
{{ "/assets/images/logo.png" | imgwh | last }}
|
91
|
+
</pre>
|
92
|
+
```
|
93
|
+
|
94
|
+
would render to
|
95
|
+
|
96
|
+
```html
|
97
|
+
<pre>
|
98
|
+
[520, 348]
|
99
|
+
520
|
100
|
+
348
|
101
|
+
</pre>
|
102
|
+
```
|
103
|
+
|
104
|
+
## Path Resolution
|
105
|
+
|
106
|
+
When the given URI contains scheme, plugin raises an error unless this scheme is listed in [`allowed_schemes`](#allowed_schemes) option (which is empty by default). In case of allowed scheme plugin tries to retrieve image size using the given URI as-is.
|
107
|
+
|
108
|
+
For URIs without scheme plugin uses URL-decoded path from URI to find image on the local filesystem.
|
109
|
+
|
110
|
+
When the image path is absolute, image is searched relative to the site source directory.
|
111
|
+
|
112
|
+
When the image path is relative, image is searched relative to the directory of the current page (`page.dir`).
|
113
|
+
|
114
|
+
When the image is not found, and a theme is used, and the path is absolute, image is also searched relative to the theme root directory.
|
115
|
+
|
116
|
+
## Error Handling
|
117
|
+
|
118
|
+
In case plugin cannot determine the image size (due to a syntax error, Liquid template error, image being nonexistent, not an image, etc.) it unconditionally raises an error which stops the site generation.
|
119
|
+
|
120
|
+
# Configuration
|
121
|
+
|
122
|
+
This plugin uses the following configuration options by default. The configuration file is the same as Jekyll's (which is `_config.yml` unless overridden):
|
123
|
+
|
124
|
+
```yml
|
125
|
+
jekyll-imgwh:
|
126
|
+
allowed_schemes: []
|
127
|
+
extra_rest:
|
128
|
+
```
|
129
|
+
|
130
|
+
These are default options i.e. you do not need to specify any of them unless you want to use different value.
|
131
|
+
|
132
|
+
### `allowed_schemes`
|
133
|
+
|
134
|
+
By default plugin allows only local image files to be used. This means if the given image URI contains non-empty scheme, plugin raises an error.
|
135
|
+
|
136
|
+
Option `allowed_schemes` adds exception for the schemes specified in it. For URIs with allowed schemes plugin will try to access them and retrieve the image size.
|
137
|
+
|
138
|
+
For example, to allow HTTPS image URLs and [data URLs](https://developer.mozilla.org/en-US/docs/Web/URI/Reference/Schemes/data) use the following:
|
139
|
+
|
140
|
+
```yml
|
141
|
+
jekyll-imgwh:
|
142
|
+
allowed_schemes: ["data", "https"]
|
143
|
+
```
|
144
|
+
|
145
|
+
### `extra_rest`
|
146
|
+
|
147
|
+
Remember `imgwh` tag syntax? This option injects additional text into all generated HTML `<img>` elements. So we may say the tag syntax is actually this:
|
148
|
+
|
149
|
+
```liquid
|
150
|
+
{% imgwh <src> <extra_rest> [<rest>] %}
|
151
|
+
```
|
152
|
+
|
153
|
+
For example, since all generated HTML `<img>` elements get the size attributes, it might be a good idea to set lazy loading for the images:
|
154
|
+
|
155
|
+
```yml
|
156
|
+
jekyll-imgwh:
|
157
|
+
extra_rest: loading="lazy"
|
158
|
+
```
|
159
|
+
|
160
|
+
# Troubleshooting
|
161
|
+
|
162
|
+
When error is related to the image image file, plugin mentions the file path in the error message:
|
163
|
+
|
164
|
+
```
|
165
|
+
$ bundle exec jekyll serve
|
166
|
+
<...>
|
167
|
+
Liquid Exception: jekyll-imgwh: 'Y:/ssg/assets/images/foo.png' could not be found in index.html
|
168
|
+
<...>
|
169
|
+
```
|
170
|
+
|
171
|
+
Plugin also logs a lot of info which can help to resolve errors raised by it. Use `jekyll serve --verbose` flag to output this debug info.
|
172
|
+
|
173
|
+
For example, for template
|
174
|
+
|
175
|
+
```
|
176
|
+
{% imgwh "/assets/images/{{ product.key }}.png" alt="{{ project.title }} Logo" class="www-logo" %}
|
177
|
+
```
|
178
|
+
|
179
|
+
it would print something like this in case of successful generation:
|
180
|
+
|
181
|
+
```
|
182
|
+
$ bundle exec jekyll serve --verbose
|
183
|
+
<...>
|
184
|
+
jekyll-imgwh: ---
|
185
|
+
jekyll-imgwh: content: '"/assets/images/{{ product.key }}.png" alt="{{ project.title }} Logo" class="www-logo"'
|
186
|
+
jekyll-imgwh: src: '/assets/images/{{ product.key }}.png'
|
187
|
+
jekyll-imgwh: rest: 'alt="{{ project.title }} Logo" class="www-logo"'
|
188
|
+
jekyll-imgwh: src rendered: '/assets/images/foo.png'
|
189
|
+
jekyll-imgwh: image path: 'Y:/ssg/assets/images/foo.png'
|
190
|
+
jekyll-imgwh: image size: [128, 64]
|
191
|
+
jekyll-imgwh: rest rendered: 'alt="My Product Logo" class="www-logo"'
|
192
|
+
<...>
|
193
|
+
```
|
194
|
+
|
195
|
+
# Development
|
196
|
+
|
197
|
+
To get started with the development:
|
198
|
+
|
199
|
+
```sh
|
200
|
+
git clone https://github.com/ojuuji/jekyll-imgwh.git
|
201
|
+
cd jekyll-imgwh
|
202
|
+
bundle install
|
203
|
+
bundle exec rspec
|
204
|
+
```
|
@@ -0,0 +1,47 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "cgi"
|
4
|
+
require "fastimage"
|
5
|
+
require "jekyll"
|
6
|
+
require "jekyll/imgwh/version"
|
7
|
+
require "uri"
|
8
|
+
|
9
|
+
module Jekyll
|
10
|
+
module Imgwh
|
11
|
+
module Helpers
|
12
|
+
def debug(message)
|
13
|
+
Jekyll.logger.debug "#{NAME}:", message
|
14
|
+
end
|
15
|
+
|
16
|
+
def image_size(src, context)
|
17
|
+
uri = URI(src)
|
18
|
+
|
19
|
+
if uri.scheme.nil?
|
20
|
+
src = resolve_path(CGI.unescape(uri.path), context)
|
21
|
+
else
|
22
|
+
allowed_schemes = context.registers[:site].config.dig(NAME, "allowed_schemes") || []
|
23
|
+
unless allowed_schemes.include?(uri.scheme)
|
24
|
+
raise ArgumentError, "#{NAME}: URIs with '#{uri.scheme}' scheme are not allowed"
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
FastImage.size(src) or raise LoadError, "#{NAME}: could not get size of image '#{src}'"
|
29
|
+
end
|
30
|
+
|
31
|
+
def resolve_path(path, context)
|
32
|
+
local_path = path.start_with?("/") ? path : File.join(context.registers[:page]["dir"], path)
|
33
|
+
local_path = File.join(context.registers[:site].source, local_path)
|
34
|
+
debug "image path: '#{local_path}'"
|
35
|
+
return local_path if File.file?(local_path)
|
36
|
+
|
37
|
+
themed_path = context.registers[:site].in_theme_dir(path) if path.start_with?("/")
|
38
|
+
raise LoadError, "#{NAME}: '#{local_path}' could not be found" unless themed_path
|
39
|
+
|
40
|
+
debug "themed image path: '#{themed_path}'"
|
41
|
+
return themed_path if File.file?(themed_path)
|
42
|
+
|
43
|
+
raise LoadError, "#{NAME}: none of '#{local_path}', '#{themed_path}' could be found"
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
@@ -0,0 +1,64 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "jekyll/imgwh/helpers"
|
4
|
+
|
5
|
+
module Jekyll
|
6
|
+
module Imgwh
|
7
|
+
class Tag < Liquid::Tag
|
8
|
+
include Helpers
|
9
|
+
|
10
|
+
def initialize(tag_name, content, tokens)
|
11
|
+
super
|
12
|
+
|
13
|
+
@content = content.strip
|
14
|
+
|
15
|
+
if (m = @content.match(%r/^(["'])((?:\1\1|(?!\1).)+)\1(?:\s+(.+))?$/))
|
16
|
+
@quote, @src, @rest = m.captures
|
17
|
+
@src = @src.gsub("#{@quote}#{@quote}", @quote)
|
18
|
+
|
19
|
+
elsif (m = @content.match(%r/^(?!["'])((?:(?!\{\{)\S|\{\{.+?\}\})+)(?:\s+(.+))?$/))
|
20
|
+
@quote = ""
|
21
|
+
@src, @rest = m.captures
|
22
|
+
|
23
|
+
else
|
24
|
+
raise SyntaxError, "#{NAME}: invalid #{tag_name} tag: '#{@content}'"
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
def render(context)
|
29
|
+
["---", "content: '#{@content}'", "src: '#{@src}'", "rest: '#{@rest}'"].map { |x| debug x }
|
30
|
+
|
31
|
+
src = Liquid::Template.parse(@src).render(context)
|
32
|
+
debug "src rendered: '#{src}'"
|
33
|
+
img = "<img src=#{quoted src}"
|
34
|
+
|
35
|
+
size = image_size(src, context)
|
36
|
+
debug "image size: #{size}"
|
37
|
+
img << " width=#{quoted size[0]} height=#{quoted size[1]}" << render_rest(context) << ">"
|
38
|
+
end
|
39
|
+
|
40
|
+
private
|
41
|
+
|
42
|
+
def quoted(value)
|
43
|
+
"#{@quote}#{value}#{@quote}"
|
44
|
+
end
|
45
|
+
|
46
|
+
def render_rest(context)
|
47
|
+
rest = +""
|
48
|
+
|
49
|
+
extra_rest = context.registers[:site].config.dig(NAME, "extra_rest")
|
50
|
+
unless extra_rest.nil?
|
51
|
+
extra_rest = Liquid::Template.parse(extra_rest).render(context)
|
52
|
+
debug "extra_rest rendered: '#{extra_rest}'"
|
53
|
+
rest << " #{extra_rest}" unless extra_rest.empty?
|
54
|
+
end
|
55
|
+
|
56
|
+
tag_rest = Liquid::Template.parse(@rest).render(context)
|
57
|
+
debug "rest rendered: '#{tag_rest}'"
|
58
|
+
rest << " #{tag_rest}" unless tag_rest.empty?
|
59
|
+
|
60
|
+
rest
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
data/lib/jekyll-imgwh.rb
CHANGED
@@ -1,114 +1,18 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require "
|
4
|
-
require "fastimage"
|
5
|
-
require "jekyll"
|
6
|
-
require "jekyll-imgwh/version"
|
7
|
-
require "uri"
|
3
|
+
require "jekyll/imgwh/tag"
|
8
4
|
|
9
5
|
module Jekyll
|
10
6
|
module Imgwh
|
11
|
-
|
12
|
-
def initialize(tag_name, content, tokens)
|
13
|
-
super
|
7
|
+
Liquid::Template.register_tag "imgwh", Tag
|
14
8
|
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
@quote, @src, @rest = m.captures
|
19
|
-
@src = @src.gsub("#{@quote}#{@quote}", @quote)
|
20
|
-
|
21
|
-
elsif (m = @content.match(%r/^(?!["'])((?:(?!\{\{)\S|\{\{.+?\}\})+)(?:\s+(.+))?$/))
|
22
|
-
@quote = ""
|
23
|
-
@src, @rest = m.captures
|
24
|
-
|
25
|
-
else
|
26
|
-
raise SyntaxError, "#{NAME}: invalid #{tag_name} tag: '#{@content}'"
|
27
|
-
end
|
28
|
-
end
|
29
|
-
|
30
|
-
def debug(message)
|
31
|
-
Jekyll.logger.debug "#{NAME}:", message
|
32
|
-
end
|
33
|
-
|
34
|
-
def render(context)
|
35
|
-
["---", "content: '#{@content}'", "src: '#{@src}'", "rest: '#{@rest}'"].map { |x| debug x }
|
36
|
-
|
37
|
-
src = Liquid::Template.parse(@src).render(context)
|
38
|
-
debug "src rendered: '#{src}'"
|
39
|
-
img = "<img src=#{quoted src}"
|
40
|
-
|
41
|
-
size = image_size(src, context)
|
42
|
-
debug "image size: #{size}"
|
43
|
-
img << " width=#{quoted size[0]} height=#{quoted size[1]}" << render_rest(context) << ">"
|
44
|
-
end
|
45
|
-
|
46
|
-
private
|
47
|
-
|
48
|
-
def quoted(value)
|
49
|
-
"#{@quote}#{value}#{@quote}"
|
50
|
-
end
|
51
|
-
|
52
|
-
def image_size(src, context)
|
53
|
-
uri = URI(src)
|
54
|
-
|
55
|
-
if uri.scheme.nil?
|
56
|
-
src = resolve_path(CGI.unescape(uri.path), context)
|
57
|
-
else
|
58
|
-
allowed_schemes = context.registers[:site].config.dig(NAME, "allowed_schemes") || []
|
59
|
-
unless allowed_schemes.include?(uri.scheme)
|
60
|
-
raise ArgumentError, "#{NAME}: URIs with '#{uri.scheme}' scheme are not allowed"
|
61
|
-
end
|
62
|
-
end
|
63
|
-
|
64
|
-
FastImage.size(src) or raise LoadError, "#{NAME}: could not get size of image '#{src}'"
|
65
|
-
end
|
66
|
-
|
67
|
-
def render_rest(context)
|
68
|
-
rest = +""
|
69
|
-
|
70
|
-
extra_rest = context.registers[:site].config.dig(NAME, "extra_rest")
|
71
|
-
unless extra_rest.nil?
|
72
|
-
extra_rest = Liquid::Template.parse(extra_rest).render(context)
|
73
|
-
debug "extra_rest rendered: '#{extra_rest}'"
|
74
|
-
rest << " #{extra_rest}" unless extra_rest.empty?
|
75
|
-
end
|
76
|
-
|
77
|
-
tag_rest = Liquid::Template.parse(@rest).render(context)
|
78
|
-
debug "rest rendered: '#{tag_rest}'"
|
79
|
-
rest << " #{tag_rest}" unless tag_rest.empty?
|
80
|
-
|
81
|
-
rest
|
82
|
-
end
|
83
|
-
|
84
|
-
def resolve_path(path, context)
|
85
|
-
local_path = resolve_local_path(path, context)
|
86
|
-
return local_path if File.file?(local_path)
|
87
|
-
|
88
|
-
themed_path = resolve_themed_path(path, context) if path.start_with?("/")
|
89
|
-
raise LoadError, "#{NAME}: '#{local_path}' could not be found" unless themed_path
|
90
|
-
|
91
|
-
return themed_path if File.file?(themed_path)
|
92
|
-
|
93
|
-
raise LoadError, "#{NAME}: none of '#{local_path}', '#{themed_path}' could be found"
|
94
|
-
end
|
95
|
-
|
96
|
-
def resolve_local_path(path, context)
|
97
|
-
path = File.join(context.registers[:page]["dir"], path) unless path.start_with?("/")
|
98
|
-
local_path = File.join(context.registers[:site].source, path)
|
99
|
-
debug "image path: '#{local_path}'"
|
100
|
-
|
101
|
-
local_path
|
102
|
-
end
|
103
|
-
|
104
|
-
def resolve_themed_path(path, context)
|
105
|
-
themed_path = context.registers[:site].in_theme_dir(path)
|
106
|
-
debug "themed image path: '#{themed_path}'"
|
9
|
+
def imgwh(src)
|
10
|
+
image_size(src, @context)
|
11
|
+
end
|
107
12
|
|
108
|
-
|
109
|
-
end
|
13
|
+
Liquid::Template.register_filter(self)
|
110
14
|
|
111
|
-
|
112
|
-
|
15
|
+
# Include after register_filter so they do not leak to Liquid yet are accessible within imgwh()
|
16
|
+
include Helpers
|
113
17
|
end
|
114
18
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-imgwh
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mikalai Ananenka
|
8
8
|
bindir: bin
|
9
9
|
cert_chain: []
|
10
|
-
date: 2025-04-
|
10
|
+
date: 2025-04-24 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: fastimage
|
@@ -107,18 +107,18 @@ dependencies:
|
|
107
107
|
- - "~>"
|
108
108
|
- !ruby/object:Gem::Version
|
109
109
|
version: '0.9'
|
110
|
-
description: 'Jekyll tag for HTML <img> element which verifies that image exists and
|
111
|
-
automatically fills width and height attributes.
|
112
|
-
|
113
|
-
'
|
114
110
|
email:
|
115
111
|
- ojuuji@gmail.com
|
116
112
|
executables: []
|
117
113
|
extensions: []
|
118
|
-
extra_rdoc_files:
|
114
|
+
extra_rdoc_files:
|
115
|
+
- README.md
|
119
116
|
files:
|
117
|
+
- README.md
|
120
118
|
- lib/jekyll-imgwh.rb
|
121
|
-
- lib/jekyll
|
119
|
+
- lib/jekyll/imgwh/helpers.rb
|
120
|
+
- lib/jekyll/imgwh/tag.rb
|
121
|
+
- lib/jekyll/imgwh/version.rb
|
122
122
|
homepage: https://github.com/ojuuji/jekyll-imgwh
|
123
123
|
licenses:
|
124
124
|
- MIT
|
@@ -139,5 +139,6 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
139
139
|
requirements: []
|
140
140
|
rubygems_version: 3.6.2
|
141
141
|
specification_version: 4
|
142
|
-
summary:
|
142
|
+
summary: A tag for <img> elements with some automation, and a filter to get image
|
143
|
+
size
|
143
144
|
test_files: []
|