jekyll-picture-tag-ng 0.2.4 → 0.3.1

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: 1fadd4c9864e9f27681da9e346142a1024a78a21f0bb574b664dca6b49eb814f
4
- data.tar.gz: 13b0413c9c635423188f138c8bbf384fb19c6922faea298b4a2c854d88709db4
3
+ metadata.gz: 0db7bf60332a01764f52029da09c289aae64dca5211d85d12e17c6fd3518b616
4
+ data.tar.gz: f86895b50c8ac8cf8062d55f9084df2650458dde3c7f6dae6ac411d26c4d4fbc
5
5
  SHA512:
6
- metadata.gz: 2328763294129ccfb827e0050af52095165d0379eaaf44df9376d71161c390d68a1fb90bb61b683b8f9502f82ca45efb2228420e9141490b7a960a0f49cafee3
7
- data.tar.gz: 332667daa306a34cd4dbcdb0bf5e84a9f6eef395b93f6252e203c2640b9d2e496bdb5eae38b6f06f720f88a5be9a078d5087ead83ba4f8c47f436086b95c9789
6
+ metadata.gz: 036f7231a4ca24104af88f7a79d048e4924de12920c2ed54353d07f58f4ff6375e8cdd0b19f6c4775de8d5835f59ccb195b29770f380c5f8d76e0b061fdb051b
7
+ data.tar.gz: 7990c47da142e389e07a2d74a878a9f4d05ad91fe12668ffc7ffa9abd9c87f52989ab29438b3f6861d588aa41b52cb4acb2aebd769f610b15904d236f6f92363
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
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Jekyll
4
4
  module PictureTag
5
- VERSION = "0.2.4"
5
+ VERSION = "0.3.1"
6
6
  end
7
7
  end
@@ -201,7 +201,8 @@ module Kramdown
201
201
  require "cgi"
202
202
  res = "<picture>"
203
203
  new_src = el.attr["src"]
204
- if File.extname(el.attr["src"]) =~ /(\.jpg|\.jpeg|\.webp)$/i
204
+ if File.extname(el.attr["src"]) =~ /(\.jpg|\.jpeg|\.webp)$/i &&
205
+ el.attr["src"] !~ %r{^https?://}
205
206
  picture_versions.each_with_index do |(version, geometry), index|
206
207
  src_base = File.join(
207
208
  "/img",
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-picture-tag-ng
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.4
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - pcouy