jekyll-image-size 1.0.1 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +6 -0
- data/jekyll-image-size.gemspec +2 -2
- data/lib/jekyll-image-size/version.rb +1 -1
- data/lib/jekyll-image-size.rb +3 -0
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a5c349d70b0f3e1b9a28bbd98f5e1578674bada1
|
4
|
+
data.tar.gz: 7fd7a02831089b2c12b6be3bc4aa742967ce2d69
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bb3ddbdbb8bfd74715f5df06ec722995c82b747ed085e572e13ecf5a8664b22b63dc2571c52ff6c526057ccc3faf8f97bdc6f9a4645cd210d54fef9b34b07a3e
|
7
|
+
data.tar.gz: c02490fe1ba1a2c0bc4a95b599262bb8138874f75ae31ccd8971dc43185f67a23349214627dfed4148baf56dc26b35511ed178ec0cdb85ea8cf7eb6266a08aa4
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -63,6 +63,9 @@ source is a string and can be one of:
|
|
63
63
|
formats:
|
64
64
|
|
65
65
|
* size: `WxH`
|
66
|
+
* json: `{width: W, height: H}`
|
67
|
+
* array: `[W, H]`
|
68
|
+
* list: `W, H`
|
66
69
|
* width: `W`
|
67
70
|
* height: `H`
|
68
71
|
* css: `width: Wpx; height: Hpx;`
|
@@ -88,6 +91,9 @@ Format examples:
|
|
88
91
|
```html
|
89
92
|
{% imagesize source %} >> 652x435
|
90
93
|
{% imagesize source:size %} >> 652x435
|
94
|
+
{% imagesize source:json %} >> {width: 652, height: 435}
|
95
|
+
{% imagesize source:array %} >> [652, 435]
|
96
|
+
{% imagesize source:list %} >> 652, 435
|
91
97
|
{% imagesize source:size/2 %} >> 326x218
|
92
98
|
{% imagesize source:width %} >> 652
|
93
99
|
{% imagesize source:height %} >> 435
|
data/jekyll-image-size.gemspec
CHANGED
@@ -9,11 +9,11 @@ Gem::Specification.new do |spec|
|
|
9
9
|
spec.authors = ["Shane Brinkman-Davis Delamore"]
|
10
10
|
spec.email = ["shane@genui.com"]
|
11
11
|
|
12
|
-
spec.summary = "Jekyll tag-plugin to read image
|
12
|
+
spec.summary = "Jekyll tag-plugin to read images and output image-sizes as: opengraph tags, img-tags, css and more - with retina support"
|
13
13
|
spec.description = <<ENDDESC
|
14
14
|
Jekyll tag-plugin to read image sizes from static assets and output in many formats.
|
15
15
|
|
16
|
-
Generate your opengraph link-tags, img-tags, css
|
16
|
+
Generate your opengraph link-tags, img-tags, css, html props, or just output the width and height of an image. All output image-sizes
|
17
17
|
can be scaled for retina support (/2 for @2x retina, /3 for @3x, etc...).
|
18
18
|
ENDDESC
|
19
19
|
spec.homepage = "https://github.com/generalui/jekyll-image-size"
|
data/lib/jekyll-image-size.rb
CHANGED
@@ -59,6 +59,9 @@ class ImageSizeTag < Liquid::Tag
|
|
59
59
|
when "height" then height.to_s
|
60
60
|
when "css" then if size then "width: #{width}px; height: #{height}px;" else "" end
|
61
61
|
when "props" then if size then "width='#{width}' height='#{height}'" else "" end
|
62
|
+
when "json" then "{width: #{width}, height: #{height}}"
|
63
|
+
when "array" then "[#{width}, #{height}]"
|
64
|
+
when "list" then "#{width}, #{height}"
|
62
65
|
when "size", nil then "#{width}x#{height}"
|
63
66
|
else raise ImageSizeError.new "invalid imagesize mode: #{mode}"
|
64
67
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-image-size
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shane Brinkman-Davis Delamore
|
@@ -83,7 +83,7 @@ dependencies:
|
|
83
83
|
description: |
|
84
84
|
Jekyll tag-plugin to read image sizes from static assets and output in many formats.
|
85
85
|
|
86
|
-
Generate your opengraph link-tags, img-tags, css
|
86
|
+
Generate your opengraph link-tags, img-tags, css, html props, or just output the width and height of an image. All output image-sizes
|
87
87
|
can be scaled for retina support (/2 for @2x retina, /3 for @3x, etc...).
|
88
88
|
email:
|
89
89
|
- shane@genui.com
|
@@ -125,6 +125,6 @@ rubyforge_project:
|
|
125
125
|
rubygems_version: 2.5.2.3
|
126
126
|
signing_key:
|
127
127
|
specification_version: 4
|
128
|
-
summary: Jekyll tag-plugin to read
|
129
|
-
|
128
|
+
summary: 'Jekyll tag-plugin to read images and output image-sizes as: opengraph tags,
|
129
|
+
img-tags, css and more - with retina support'
|
130
130
|
test_files: []
|