jekyll-srcset 0.0.1 → 0.0.2

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: 7c7418640e348e981fa4227f1441ae8e06cb2f67
4
- data.tar.gz: ea892df1d928b935aad0ec409c8848a1b6d0157e
3
+ metadata.gz: ae4b06042ffab7e4ffeb4848224eae527a0a5a47
4
+ data.tar.gz: ec04ef409edcd2377d8363b22ef77cef32ee1d59
5
5
  SHA512:
6
- metadata.gz: a21c4aedeb8d0b6a6da50229a503e09924dd6783c27ef0394dc5b282fb9e4d8883588624404e7d2d121f7c74361614e6a44a342ec539a4b5e718e2bf85e053b5
7
- data.tar.gz: 42417e1b5b3b66a9cd78f9ccaa5800ae567ef9d6496bae2df017e7f453f9308e10a0d09c6e540c797103e60697b9695d7834f14133f27506303dfb0c5b1075e9
6
+ metadata.gz: bbec4494a16ffbdd9761b7f4b8f7ed93e73ca1bce9db2766cfa8a27cae54f71deb8727d97796f8ed3bbb4ba0734c6a9297a240ffa78cf862d9838db5d99076f4
7
+ data.tar.gz: cf0062c05384140e9b36f79c31dbfbd6be1f3d775851a88e687ec04eea7399287ad575d23a38aebaf9e9b722dd98b6da070ac6bb6ecd88c39db10857cf0eb9b7
data/README.md CHANGED
@@ -4,7 +4,7 @@ This Jekyll plugin makes it very easy to send larger images to devices with high
4
4
 
5
5
  The plugin adds an `image_tag` Liquid tag that can be used like this:
6
6
 
7
- ```liquid
7
+ ```html
8
8
  {% image_tag src="/image.png" width="100" %}
9
9
  ```
10
10
 
@@ -45,12 +45,18 @@ Use it like this in any Liquid template:
45
45
  {% image_tag src="/image.png" width="100" %}
46
46
  ```
47
47
 
48
- You must specify either a `width` or a `height`, but never both. The width or height will be used to determine the smallest version of the image to use. Based on this minimum size, the plugin will generate up to 3 versions of the image, one that matches the dimension specified, one that's twice the size and one that's 3 times the size.
48
+ You must specify either a `width` or a `height`, but never both. The width or height will be used to determine the smallest version of the image to use (for 1x pixel density devices). Based on this minimum size, the plugin will generate up to 3 versions of the image, one that matches the dimension specified, one that's twice the size and one that's 3 times the size. The plugin never upscales an image.
49
49
 
50
50
  The plugin sets these as a srcset attribute on the final image tag, and modern browsers will then use this information to determine which version of the image to load based on the pixel density of the device (and in the future, potentially based on bandwidth or user settings).
51
51
 
52
52
  This makes it a really straight forward way to serve the right size of image in all modern browsers and in works fine in older browsers without any polyfill (there's not a lot of high pixel density devices out there that runs old browsers, so simply serving the smallest version to the ones that don't understand srcset is fine).
53
53
 
54
+ To use variables for the image or the dimensions, simply leave out the quotes:
55
+
56
+ ```html
57
+ {% image_tag src=page.cover_image height=page.cover_image_height %}
58
+ ```
59
+
54
60
  ## Optipng
55
61
 
56
62
  If you have `optipng` installed and in your PATH, the plugin wil automatically run it on all generated png images.
@@ -16,7 +16,7 @@ Gem::Specification.new do |spec|
16
16
 
17
17
  \{% image_tag src="/image.png" width="100" %\}
18
18
  }
19
- spec.homepage = ""
19
+ spec.homepage = "https://github.com/netlify/jekyll-srcset"
20
20
  spec.license = "MIT"
21
21
 
22
22
  spec.files = `git ls-files -z`.split("\x0")
@@ -1,5 +1,5 @@
1
1
  module Jekyll
2
2
  module Srcset
3
- VERSION = "0.0.1"
3
+ VERSION = "0.0.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-srcset
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mathias Biilmann Christensen
@@ -89,7 +89,7 @@ files:
89
89
  - lib/jekyll/srcset.rb
90
90
  - lib/jekyll/srcset/tag.rb
91
91
  - lib/jekyll/srcset/version.rb
92
- homepage: ''
92
+ homepage: https://github.com/netlify/jekyll-srcset
93
93
  licenses:
94
94
  - MIT
95
95
  metadata: {}