jekyll-thumb 0.1.2 → 0.2

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: 4e9c69f7aefb6cb534c9b726af89557da8a44b0ac93a96a935f20b61795f0662
4
- data.tar.gz: 0eb4a874951e6a0edc5e1c244585bd0a76370aff4edb60eb9627dba2820d7cc3
3
+ metadata.gz: 861c049f460eadcc03e55cac062b4a420dae382a37bda263e89c5208d5bce138
4
+ data.tar.gz: 630f43935f173fbc31f4cf86ffdc397982e22cf6e1d27d18f253c2b5c8aa5d1d
5
5
  SHA512:
6
- metadata.gz: 49423ba413061e7b31c3bb44dad6acf48825927722f837a883e0bfa466003db9b365444ebc71ba1f4eff4130e8205542a906e45585664cebe8ce905410ba39ca
7
- data.tar.gz: 22e6b0e472833fae64119d8b25adede32883466fd74241366f97bade4116e5676302fb26d052dd9e1839ef3e9630389a991b5f3e3553149f60cd7b8f18c288a9
6
+ metadata.gz: e0456a9e83e49e728aefb854d9790e75dabe72202bd9261161604d59b77cb700b3ec9563e1ee31f7752be6671abf720c9b3334a5a61b67f214cf843437deb300
7
+ data.tar.gz: a5b87996b706a2221e0fa31a80e97d23996640a114a4762b143c2ecfe1f62008267f1bd759e952b32afd414d7e96f09151db7de0b309523f449f9d1b4351d626
data/README.md CHANGED
@@ -34,7 +34,7 @@ Then bundle:
34
34
 
35
35
  $ bundle
36
36
 
37
- Or install it yourself as:
37
+ Or install it yourself with:
38
38
 
39
39
  $ gem install jekyll-thumb
40
40
 
@@ -58,6 +58,8 @@ To use variables for the image or the dimensions, simply leave out the quotes:
58
58
  {% thumb src=page.cover_image height=page.cover_image_height %}
59
59
  ```
60
60
 
61
+ By default this will wrap the resized `img` in a link to the original, with a `target="_blank"` attribute. To supress this, pass a `link=false` option to the `thumb` tag.
62
+
61
63
  ## Optipng
62
64
 
63
65
  If you have `optipng` installed and in your PATH, you can tell the plugin to run it on all generated png images.
@@ -69,7 +71,7 @@ thumb:
69
71
  optipng: true
70
72
  ```
71
73
 
72
- To your \_config.yml
74
+ To your `_config.yml`
73
75
 
74
76
  Currently the plugin doesn't optimize other image formats, except for stripping color palettes.
75
77
 
@@ -23,7 +23,10 @@ module Jekyll
23
23
  site = context.registers[:site]
24
24
  img_attrs = generate_image(site, options["src"], options)
25
25
 
26
- %Q{<a href="#{options['src']}" target="_blank" class="thumb"><img #{options.merge(img_attrs).map {|k,v| "#{k}=\"#{v}\""}.join(" ")}></a>}
26
+ img = %Q{<img #{options.merge(img_attrs).map {|k,v| "#{k}=\"#{v}\""}.join(" ")}>}
27
+ return img if options['link'] == false
28
+
29
+ %Q{<a href="#{options['src']}" target="_blank" class="thumb">#{img}</a>}
27
30
  end
28
31
 
29
32
  def parse_options(markup, context)
@@ -1,5 +1,5 @@
1
1
  module Jekyll
2
2
  module Thumb
3
- VERSION = "0.1.2"
3
+ VERSION = "0.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-thumb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: '0.2'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonathan Davies
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-10-02 00:00:00.000000000 Z
11
+ date: 2019-05-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ruby-vips
@@ -102,8 +102,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
102
102
  - !ruby/object:Gem::Version
103
103
  version: '0'
104
104
  requirements: []
105
- rubyforge_project:
106
- rubygems_version: 2.7.6
105
+ rubygems_version: 3.0.3
107
106
  signing_key:
108
107
  specification_version: 4
109
108
  summary: This Jekyll plugin adds a thumb tag which will autogenerate image thumbnails