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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c5a3db6bb09df56868f1b6e0656f6ae514e07fc5
4
- data.tar.gz: 2d04e0ae9d364374b60dbe38c684b21473ae2ed7
3
+ metadata.gz: a5c349d70b0f3e1b9a28bbd98f5e1578674bada1
4
+ data.tar.gz: 7fd7a02831089b2c12b6be3bc4aa742967ce2d69
5
5
  SHA512:
6
- metadata.gz: 431829df9e4db99f40b9b06262668ca79ffd23e01fa8de131fa092f00f58c688a8949821d55deaaec2e44392c1afcb8b9634179a724a50d72fe21d37ed07acd5
7
- data.tar.gz: 7257e0a0d1565798031611d0f56c7a92719a4aa185eff62e69bb647b5ce9109e2c75dda56ccd95e0124e1f08f9e8106831b24666b5276e3528d8c4151659084f
6
+ metadata.gz: bb3ddbdbb8bfd74715f5df06ec722995c82b747ed085e572e13ecf5a8664b22b63dc2571c52ff6c526057ccc3faf8f97bdc6f9a4645cd210d54fef9b34b07a3e
7
+ data.tar.gz: c02490fe1ba1a2c0bc4a95b599262bb8138874f75ae31ccd8971dc43185f67a23349214627dfed4148baf56dc26b35511ed178ec0cdb85ea8cf7eb6266a08aa4
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- jekyll-image-size (1.0.1)
4
+ jekyll-image-size (1.1.0)
5
5
  fastimage (>= 1.8)
6
6
  jekyll (>= 3.7)
7
7
 
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
@@ -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 sizes from static assets and output in many formats."
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 or html props, or just output the width and height of an image. All output image-sizes
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"
@@ -1,5 +1,5 @@
1
1
  module Jekyll
2
2
  module ImageSize
3
- VERSION = "1.0.1"
3
+ VERSION = "1.1.0"
4
4
  end
5
5
  end
@@ -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.1
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 or html props, or just output the width and height of an image. All output image-sizes
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 image sizes from static assets and output in many
129
- formats.
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: []