jekyll-lazy-load-image 0.2.0 → 0.2.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b3172715c60eea86ceb441ac1b14426f5fac9acd625f6312fc46b82d7da993ca
4
- data.tar.gz: 77ae96b69eb3262d3317a16d40dad04cbf5fe98ef1e043c9a7e47bf1877e5870
3
+ metadata.gz: c696ccda009d511e7958e9bfc2d59c155bc4b85ea2160953e3e49f45de30e500
4
+ data.tar.gz: 0474cee59f54ca296da5b17c5ccae7824cdc8b4778bd92337d4c4e4ac3b8224a
5
5
  SHA512:
6
- metadata.gz: 1e10e503b85382c46eceaa9b13433e08a7246a5b199f6d467c6a0ad00050bb531e802a3daddfa0cdb0f389bd358865f3d128e1d8973724a48a358ccaa67dbc8a
7
- data.tar.gz: 5eb99b095c9db8722a8ae31f96b350f8cf91ccbb281a532cfb2599cf10ca88d8e42015bb6ad4967478e6ac5d07875bfb17dab7492910ccb29db2037df3fe7ad5
6
+ metadata.gz: fb9a1be310d069da1fdf10e8ba10b7e3e4adf2cdf7cb38478970e602812e5f26cd35dd10265d74f1b3facaa147268de8ec7257066e2b550c4b7f0624eb09b823
7
+ data.tar.gz: 67218bcbb1886e088b137b079ac13b37d632b39de79fbccf7e3a091523d6fcc1bcd4238802abde7200351bcc4a03c42e8749d450e8e223604e8ce949549eb5db
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Jekyll LazyLoadImage [![Build Status](https://travis-ci.org/kenchan0130/jekyll-lazy-load-image.svg?branch=master)](https://travis-ci.org/kenchan0130/jekyll-lazy-load-image)
1
+ # Jekyll Lazy Load Image [![Build Status](https://travis-ci.org/kenchan0130/jekyll-lazy-load-image.svg?branch=master)](https://travis-ci.org/kenchan0130/jekyll-lazy-load-image)
2
2
 
3
3
  _Edit img tag optimized lazy load images for your Jekyll site_
4
4
 
@@ -8,7 +8,9 @@ _Edit img tag optimized lazy load images for your Jekyll site_
8
8
  Add the following to your site's `Gemfile`:
9
9
 
10
10
  ```ruby
11
- gem 'jekyll-lazy-load-image', require: 'jekyll-lazy-load-image/auto-execution'
11
+ group :jekyll_plugins do
12
+ gem 'jekyll-lazy-load-image', require: 'jekyll-lazy-load-image/auto-execution'
13
+ end
12
14
  ```
13
15
 
14
16
  and run bundle.
@@ -45,12 +45,8 @@ module JekyllLazyLoadImage
45
45
 
46
46
  node.set_attribute("class", "") if class_value.nil?
47
47
  node_class_attr = node.attributes["class"]
48
- class_array_option = [node_class_attr.value, @site_config.class_attr_values].flatten
49
- class_array = class_array_option.reject do |class_name|
50
- class_name.nil? || class_name.empty?
51
- end
52
-
53
- node_class_attr.value = normalize_class_array(class_array)
48
+ class_array = [node_class_attr.value, @site_config.class_attr_values].flatten
49
+ node_class_attr.value = normalize_class_array(class_array).join(" ")
54
50
  end
55
51
 
56
52
  def inject_additional_attrs(node)
@@ -64,7 +60,7 @@ module JekyllLazyLoadImage
64
60
  end
65
61
 
66
62
  def normalize_class_array(array)
67
- array.map(&:strip).uniq.join(" ")
63
+ array.compact.uniq.map(&:strip).reject(&:empty?)
68
64
  end
69
65
  end
70
66
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module JekyllLazyLoadImage
4
- VERSION = "0.2.0"
4
+ VERSION = "0.2.1"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-lazy-load-image
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tadayuki Onishi