jekyll-tilt 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -0
- data/lib/jekyll/tilt.rb +13 -5
- data/lib/jekyll/tilt/processor.rb +4 -2
- data/lib/jekyll/tilt/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 811b3a30af84ffb0fc66c59e7ea4742e3e4983b60e6b2d6641c38fd31789f5c9
|
4
|
+
data.tar.gz: b9735cb1c76144c46371d8c5cb87737f12153867335279ff6a8c133d7e5ab06d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 31e2741ff792e59cf551c6fabaeeb8a1a3fa883f4539ab29aed2328d7ba0c1e4509ee5015edc57e56ed29d4b9add09bb91b5dd6a88bb161bd36a1298a2ff460e
|
7
|
+
data.tar.gz: fedec0f1b69a18991087dc28980b9e411422d45d90433ec119d540674b0376ca3663ed74fc7b81123ae7cc5e160c8afae65ce04988a65e80d87dcb3d8c7f1d67
|
data/Gemfile
CHANGED
data/lib/jekyll/tilt.rb
CHANGED
@@ -20,7 +20,9 @@ module Jekyll
|
|
20
20
|
def self.setup!
|
21
21
|
Jekyll::Hooks.register(:site, :pre_render) { |s, _| convert_l!(s) }
|
22
22
|
Jekyll::Hooks.register [:documents, :pages], :pre_render do |d, _|
|
23
|
-
convert_d!(d
|
23
|
+
convert_d!(d, {
|
24
|
+
site: d.site,
|
25
|
+
})
|
24
26
|
end
|
25
27
|
end
|
26
28
|
|
@@ -30,7 +32,9 @@ module Jekyll
|
|
30
32
|
# --
|
31
33
|
def self.convert_l!(site)
|
32
34
|
site.layouts.each_value do |v|
|
33
|
-
convert_d!(v
|
35
|
+
convert_d!(v, {
|
36
|
+
site: site,
|
37
|
+
})
|
34
38
|
end
|
35
39
|
end
|
36
40
|
|
@@ -38,9 +42,13 @@ module Jekyll
|
|
38
42
|
# Convert pages
|
39
43
|
# @return [nil]
|
40
44
|
# --
|
41
|
-
def self.convert_d!(
|
42
|
-
|
43
|
-
ext:
|
45
|
+
def self.convert_d!(page, site:)
|
46
|
+
page.content = Processor.run_for(page.content, {
|
47
|
+
ext: page.data["ext"] || page.ext,
|
48
|
+
var: {
|
49
|
+
page: page,
|
50
|
+
site: site,
|
51
|
+
},
|
44
52
|
})
|
45
53
|
end
|
46
54
|
|
@@ -47,9 +47,11 @@ module Jekyll
|
|
47
47
|
# @param out [String] the content to output
|
48
48
|
# @return [String]
|
49
49
|
# --
|
50
|
-
def self.run_for(out, ext:)
|
50
|
+
def self.run_for(out, ext:, var: {})
|
51
51
|
find_for(ext).each do |v|
|
52
|
-
out = v.run_for(out
|
52
|
+
out = v.run_for(out, {
|
53
|
+
**var,
|
54
|
+
})
|
53
55
|
end
|
54
56
|
|
55
57
|
out
|
data/lib/jekyll/tilt/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-tilt
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jordon Bedwell
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-05-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|