jekyll-srcset-tag 0.1.3 → 0.1.4
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 194e7fb5c9eb2b7a53422c5ba2ae6a8104f0611a
|
4
|
+
data.tar.gz: 5f93965bacc7f99a446962d94ffb5eb591b7ae72
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 341e7fa5751f78a13664b187ff85263ddd2bb6227686cae831f26c703c083b270a0dc8c69e5968e3fb9227ea073720373a87916be6181a8ae90e21d6b57aa9b6
|
7
|
+
data.tar.gz: 0420a9375e8944b674d37a3f9afb0ae6ca11eef99a72b0e1b41a0bfaf72edf6f8bd8dba8fc462271a1f6469b4502bb77d2b446949e35925849ab17efb640c400
|
@@ -59,6 +59,14 @@ module Jekyll
|
|
59
59
|
File.join(web_output_path, image_path + '-' + digest.slice(0, 7))
|
60
60
|
end
|
61
61
|
|
62
|
+
def source_image_path
|
63
|
+
File.join(source_path, image_path)
|
64
|
+
end
|
65
|
+
|
66
|
+
def output_image_paths
|
67
|
+
uniq_instances.map { |instance| File.join(output_dir, instance.filename)}
|
68
|
+
end
|
69
|
+
|
62
70
|
protected
|
63
71
|
|
64
72
|
def create_instances
|
@@ -16,7 +16,6 @@ module Jekyll
|
|
16
16
|
.render(context)
|
17
17
|
.gsub(/\\\{\\\{|\\\{\\%/, '\{\{' => '{{', '\{\%' => '{%')
|
18
18
|
|
19
|
-
# set keep files
|
20
19
|
settings = srcset_settings(context)
|
21
20
|
site = context.registers[:site]
|
22
21
|
site.config['keep_files'] << settings['output'] unless site.config['keep_files'].include?(settings['output'])
|
@@ -30,6 +29,8 @@ module Jekyll
|
|
30
29
|
image.to_html
|
31
30
|
end
|
32
31
|
|
32
|
+
protected
|
33
|
+
|
33
34
|
def sources(content)
|
34
35
|
# return sources objects
|
35
36
|
html = Nokogiri::HTML(content)
|
@@ -75,6 +76,14 @@ module Jekyll
|
|
75
76
|
settings['output'] ||= 'images/generated'
|
76
77
|
settings
|
77
78
|
end
|
79
|
+
|
80
|
+
def register_regenerate(context, image)
|
81
|
+
site = context.registers[:site]
|
82
|
+
if context.registers[:page] and context.registers[:page].has_key? 'path'
|
83
|
+
site.regenerator.add_dependency site.in_source_dir(context.registers[:page]['path']),
|
84
|
+
image.source_image_path
|
85
|
+
end
|
86
|
+
end
|
78
87
|
end
|
79
88
|
end
|
80
89
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-srcset-tag
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kevin Dew
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-12-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|