jekyll_picture_tag 1.4.0 → 1.5.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
  SHA256:
3
- metadata.gz: 92f25151354c1e1d62aa3b9097316538012dfa84bcd91bad49af2349adc25b12
4
- data.tar.gz: b80c014044abfb092c8949faf674281d57f130384ca2c37b0b17715a445048eb
3
+ metadata.gz: 8c92364f9a864fd33948b32ddfb9593b6256d1f14da56cf821175189b30c2ea4
4
+ data.tar.gz: ea0e199aaafcef76906b61de9a03170c84e6e6e2771bcaf2aa2e9ace7223ca80
5
5
  SHA512:
6
- metadata.gz: b16a09afffe03178211c01840eb3767f0fc7c21b597f1148dff9d6f35fedefa6830288b23c63bd28bc75a67683ad3d8d633c2c3ce44af2c5916f7cee16722685
7
- data.tar.gz: 45875378703e55d08f11f1d0a102fdfe9cae09c75a6aae8edd16d83277b8cccb4d72e3307c02a592a66481a7f39f5e8f3c078e97dbf57013dbc1d968d64a40e3
6
+ metadata.gz: 990f28ad52b23265ae10ab7430060fddc5ef902b03d87fb9fe4d0796dc5ff221720a277d5abca89bdf2cc8973c41994a03dcae8a1ef9ba459af1ac29c53d999b
7
+ data.tar.gz: cfbd031a3741f63e9653cf098e5e95af411d52081f5b06ca7497d89ad64ed93dd762a0f1655c9752b18104bb913fde0854a157c0948796372439f1d7f026c99e
@@ -1,3 +1,20 @@
1
+ # Why 2 gemspecs?
2
+
3
+ # Originally, this gem was named 'jekyll-picture-tag', and published on rubygems
4
+ # under this name. There was a break in development, during which push access to
5
+ # rubygems was lost. Development was later resumed, and as a workaround for that
6
+ # issue the installation instructions were to source the gem from the Github
7
+ # repository.
8
+ #
9
+ # Ultimately, the decision was made to rename it by switching the dashes for
10
+ # underscores, which follows best practice and allows pushing it to rubygems
11
+ # under the new name. The drawback of this situation is that everyone who
12
+ # followed the installaion instructions previously would see their site
13
+ # inexplicably break, as it would be searching for a gemspec that doesn't exist.
14
+ # As a workaround (to the old workaround... sigh) this gemspec lets us print a
15
+ # warning and then require the new version, which keeps old sites working while
16
+ # encouraging people to use rubygems.
17
+
1
18
  lib = File.expand_path('lib', __dir__)
2
19
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
20
  require 'jekyll_picture_tag/version'
@@ -11,7 +11,7 @@ puts <<~HEREDOC
11
11
 
12
12
  and replace it with:
13
13
 
14
- gem 'jekyll_picture_tag', '~> 1.3'
14
+ gem 'jekyll_picture_tag'
15
15
 
16
16
  Sorry about that. For an explanation, see issue #120:
17
17
  https://github.com/rbuchberger/jekyll-picture-tag/issues/120
@@ -76,10 +76,6 @@ module PictureTag
76
76
  @config.build_source_url(filename)
77
77
  end
78
78
 
79
- def nomarkdown?
80
- @config.nomarkdown?
81
- end
82
-
83
79
  # Preset forwarding
84
80
  def widths(media)
85
81
  @preset.widths(media)
@@ -93,6 +89,11 @@ module PictureTag
93
89
  @preset.fallback_width
94
90
  end
95
91
 
92
+ def nomarkdown?
93
+ @preset.nomarkdown?
94
+ end
95
+
96
+
96
97
  # Params forwarding
97
98
  def preset_name
98
99
  @params.preset_name
@@ -27,6 +27,16 @@ module PictureTag
27
27
  @content['fallback_width']
28
28
  end
29
29
 
30
+ # Allows a per-preset hard override of the global nomarkdown setting and
31
+ # JPT's feeble attempts at auto-detection.
32
+ def nomarkdown?
33
+ if @content['nomarkdown'].nil?
34
+ PictureTag.config.nomarkdown?
35
+ else
36
+ @content['nomarkdown']
37
+ end
38
+ end
39
+
30
40
  private
31
41
 
32
42
  def build_preset
@@ -31,8 +31,10 @@ module PictureTag
31
31
 
32
32
  # Handles various wrappers around basic markup
33
33
  def wrap(markup)
34
- markup = anchor_tag(markup) if PictureTag.html_attributes['link']
35
- markup = nomarkdown_wrapper(markup.to_s) if PictureTag.nomarkdown?
34
+ if PictureTag.html_attributes['link']
35
+ markup = anchor_tag(markup)
36
+ markup = nomarkdown_wrapper(markup.to_s) if PictureTag.nomarkdown?
37
+ end
36
38
 
37
39
  markup
38
40
  end
@@ -1,3 +1,3 @@
1
1
  module PictureTag
2
- VERSION = '1.4.0'.freeze
2
+ VERSION = '1.5.0'.freeze
3
3
  end
data/readme.md CHANGED
@@ -83,7 +83,7 @@ Get this in your generated site:
83
83
  ```html
84
84
  <!-- Line breaks added for readability, the actual markup will not have them. -->
85
85
 
86
- <img src="/generated/test-800-195f7d.jpg"
86
+ <img src="/generated/test-800-195f7d.jpg"
87
87
  srcset="/generated/test-400-195f7d.jpg 400w,
88
88
  /generated/test-600-195f7d.jpg 600w,
89
89
  /generated/test-800-195f7d.jpg 800w,
@@ -178,19 +178,31 @@ modifications and I'll take care of it.
178
178
 
179
179
  # Release History
180
180
 
181
- * 1.4.0 Jun 26, 2019:
181
+ * 1.5.0 Jun 26, 2019:
182
+ * better `{::nomarkdown}` necessity detection
183
+ * allow user to override `{::nomarkdown}` autodetection
184
+ * 1.4.0 Jun 26, 2019:
182
185
  * Rename gem from `jekyll-picture-tag` to `jekyll_picture_tag`, allowing us to use rubygems again.
183
186
  * Add new output format: `naked_srcset`.
184
187
  * 1.3.1 Jun 21, 2019: Bugfix
185
- * 1.3.0 Jun 7, 2019: Initial compatibility with Jekyll 4.0, bugfixes, change to generated image
186
- naming. The first build after this update will be longer, and you might want to clear out your
187
- generated images.
188
- * 1.2.0 Feb 9, 2019: Add nomarkdown fix, noscript option, relative url option, anchor tag wrappers
189
- * 1.1.0 Jan 22, 2019: Add direct_url markup format, auto-orient images before stripping metadata.
188
+ * 1.3.0 Jun 7, 2019:
189
+ * Initial compatibility with Jekyll 4.0
190
+ * bugfixes
191
+ * change to generated image naming-- The first build after this update will be longer, and you
192
+ might want to clear out your generated images.
193
+ * 1.2.0 Feb 9, 2019:
194
+ * Add nomarkdown fix
195
+ * noscript option
196
+ * relative url option
197
+ * anchor tag wrappers
198
+ * 1.1.0 Jan 22, 2019:
199
+ * Add direct_url markup format,
200
+ * auto-orient images before stripping metadata
190
201
  * 1.0.2 Jan 18, 2019: Fix ruby version specification
191
- * 1.0.1 Jan 13, 2019: Added ruby version checking for more helpful error messages when running old versions of ruby.
192
- * **1.0.0** Nov 27, 2018: Rewrite from the ground up. See [migration.md](/migration.md).
193
- * 0.2.2 Aug 2, 2013: Bugfixes.
202
+ * 1.0.1 Jan 13, 2019: Added ruby version checking
203
+ * **1.0.0** Nov 27, 2018: Rewrite from the ground up. See [the migration
204
+ guide](https://github.com/rbuchberger/jekyll-picture-tag/wiki/Migrating-from-versions-prior-to-1.0).
205
+ * 0.2.2 Aug 2, 2013: Bugfixes
194
206
  * 0.2.1 Jul 17, 2013: Refactor again, add Liquid parsing.
195
207
  * 0.2.0 Jul 14, 2013: Rewrite code base, bring in line with Jekyll Image Tag.
196
208
  * 0.1.1 Jul 5, 2013: Quick round of code improvements.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll_picture_tag
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.0
4
+ version: 1.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robert Wierzbowski