jekyll-picture-tag-ng 0.2.4 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/jekyll-picture-tag-ng/version.rb +1 -1
- data/lib/jekyll-picture-tag-ng.rb +3 -1
- 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: 16f42bd13a6802cd5f6ed65bbeaf0bce3dace3f9ccf7c0139786545c8bc3935c
|
4
|
+
data.tar.gz: c098473b51d98a4a79ad16baf584d79c643ff17ffbac15d3f909d29f2a9e420d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 40db0e283c5bcba0ae73096bc95bcb294853f115e7f86c05a616ad1c86501660c8460b453484c7990ddaa839caba8277a5fc309ab6306c03979c6e987e7d892c
|
7
|
+
data.tar.gz: f57d381abdb4acca624ced2cfab14112991d4fa94b8e7854ef654173eef16da6f96f73807f1c09819949f373b1f1d5b850b634e7c784b169c2b9f49598fa1a87
|
data/README.md
CHANGED
@@ -51,7 +51,7 @@ After adding the custom action to your repository, you'll need to update the rep
|
|
51
51
|
|
52
52
|
By installing the plugin and activating it, `jekyll build` and `jekyll serve` commands will perform an additional step to generate several versions of your `jpeg` and `webp` files : for each of these files in the source directory, and each version defined, a file will be output in the `img/{version}` directory of the rendered website.
|
53
53
|
|
54
|
-
When using the default markdown syntax for including pictures (`![Alt text](PICTURE_URL)`) with the Kramdown renderer, `<picture>` tags with appropriate `<source>` children tags will be output.
|
54
|
+
When using the default markdown syntax for including pictures (`![Alt text](PICTURE_URL)`) with the Kramdown renderer, `<picture>` tags with appropriate `<source>` children tags will be output. This will automatically exclude any picture element with the `src` attribute starting with "`http://`" or "`https://`".
|
55
55
|
|
56
56
|
When working locally, you can use the `--incremental` option to prevent Jekyll from re-generating all the pictures (which can take a long time) when re-launching the `jekyll serve` command. This is useful when developing a plugin or tweaking the `_config.yml` file (which both require you to frequently re-launch the `jekyll serve` command). However, be careful about using this option when changing the plugin's output image formats : the plugin will skip generating the new output formats in `--incremental` mode for pictures that were previously generated for the old output formats.
|
57
57
|
|
@@ -201,7 +201,9 @@ module Kramdown
|
|
201
201
|
require "cgi"
|
202
202
|
res = "<picture>"
|
203
203
|
new_src = el.attr["src"]
|
204
|
-
|
204
|
+
puts el.attr["src"]
|
205
|
+
if File.extname(el.attr["src"]) =~ /(\.jpg|\.jpeg|\.webp)$/i &&
|
206
|
+
el.attr["src"] !~ %r{^https?://}
|
205
207
|
picture_versions.each_with_index do |(version, geometry), index|
|
206
208
|
src_base = File.join(
|
207
209
|
"/img",
|