jekyll_picture_tag 1.4.0 → 1.5.0
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 +4 -4
- data/jekyll-picture-tag.gemspec +17 -0
- data/lib/jekyll-picture-tag.rb +1 -1
- data/lib/jekyll_picture_tag/instructions.rb +5 -4
- data/lib/jekyll_picture_tag/instructions/preset.rb +10 -0
- data/lib/jekyll_picture_tag/output_formats/basics.rb +4 -2
- data/lib/jekyll_picture_tag/version.rb +1 -1
- data/readme.md +22 -10
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8c92364f9a864fd33948b32ddfb9593b6256d1f14da56cf821175189b30c2ea4
|
4
|
+
data.tar.gz: ea0e199aaafcef76906b61de9a03170c84e6e6e2771bcaf2aa2e9ace7223ca80
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 990f28ad52b23265ae10ab7430060fddc5ef902b03d87fb9fe4d0796dc5ff221720a277d5abca89bdf2cc8973c41994a03dcae8a1ef9ba459af1ac29c53d999b
|
7
|
+
data.tar.gz: cfbd031a3741f63e9653cf098e5e95af411d52081f5b06ca7497d89ad64ed93dd762a0f1655c9752b18104bb913fde0854a157c0948796372439f1d7f026c99e
|
data/jekyll-picture-tag.gemspec
CHANGED
@@ -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'
|
data/lib/jekyll-picture-tag.rb
CHANGED
@@ -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
|
-
|
35
|
-
|
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
|
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.
|
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:
|
186
|
-
|
187
|
-
|
188
|
-
*
|
189
|
-
|
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
|
192
|
-
* **1.0.0** Nov 27, 2018: Rewrite from the ground up. See [migration
|
193
|
-
|
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.
|