bridgetown-core 0.18.2 → 0.18.3
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aff1b7af860afa9442e9a9cc6f34b0dd48fa6677248a118acc794a60de6f6328
|
4
|
+
data.tar.gz: 3cfc657c9c5958cdf45cddf6bac5b1c84de276a8b10000b6b7a4c28d977f4ec1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ab2136623a924cead3223313b7ccd2cf46ffcc3c1c34de6096162d309e7e91ae2e1ce7af61abba4bc564cef67906977efead5780a27e5c4c407f14c2250e591e
|
7
|
+
data.tar.gz: 0a6a770a52c1d23906c5bfbe7fc45a60666dcdb25359eb184585594d94ef4de9ef97c4587b4272a3dc95f1a3a2bdeb8b9327ab92b621a0a9672e3ec33aeb7b83
|
@@ -101,6 +101,8 @@ module Bridgetown
|
|
101
101
|
#
|
102
102
|
# @return [String] The converted content.
|
103
103
|
def convert(content, convertible)
|
104
|
+
return content if convertible.data[:template_engine] != "erb"
|
105
|
+
|
104
106
|
erb_view = Bridgetown::ERBView.new(convertible)
|
105
107
|
|
106
108
|
erb_renderer = Tilt::ErubiTemplate.new(
|
@@ -123,10 +125,13 @@ module Bridgetown
|
|
123
125
|
if convertible.data[:template_engine] == "erb" ||
|
124
126
|
(convertible.data[:template_engine].nil? &&
|
125
127
|
@config[:template_engine] == "erb")
|
128
|
+
convertible.data[:template_engine] = "erb"
|
126
129
|
return true
|
127
130
|
end
|
128
131
|
|
129
|
-
super(ext)
|
132
|
+
super(ext).tap do |ext_matches|
|
133
|
+
convertible.data[:template_engine] = "erb" if ext_matches
|
134
|
+
end
|
130
135
|
end
|
131
136
|
|
132
137
|
def output_ext(ext)
|
@@ -23,6 +23,8 @@ module Bridgetown
|
|
23
23
|
#
|
24
24
|
# @return [String] The converted content.
|
25
25
|
def convert(content, convertible)
|
26
|
+
return content if convertible.data[:template_engine] != "liquid"
|
27
|
+
|
26
28
|
self.class.cached_partials ||= {}
|
27
29
|
|
28
30
|
@site = convertible.site
|
@@ -53,9 +55,14 @@ module Bridgetown
|
|
53
55
|
# rubocop: enable Metrics/AbcSize
|
54
56
|
|
55
57
|
def matches(ext, convertible)
|
56
|
-
|
58
|
+
if convertible.render_with_liquid?
|
59
|
+
convertible.data[:template_engine] = "liquid"
|
60
|
+
return true
|
61
|
+
end
|
57
62
|
|
58
|
-
super(ext)
|
63
|
+
super(ext).tap do |ext_matches|
|
64
|
+
convertible.data[:template_engine] = "liquid" if ext_matches
|
65
|
+
end
|
59
66
|
end
|
60
67
|
|
61
68
|
def output_ext(ext)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bridgetown-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.18.
|
4
|
+
version: 0.18.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bridgetown Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-11-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|