jekyll_flexible_include 2.0.5 → 2.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/flexible_include/version.rb +1 -1
- data/lib/jekyll_tag_helper.rb +5 -4
- 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: fed2067800a2324df252ff3e8cfd48b21c9cb3754e5e5b474d135ebb307cd8bf
|
4
|
+
data.tar.gz: abbf8f05f739832f259d9cb16d16d552ae18ee3da17a5bf8a77cae933cdb9b76
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b33745dc685acc809658f6ad42efaea735747c5b6816653e10ae56e5f001f957e0f13959d3e1cffe954d2ba8270309277a322568d8536864d9fc055938e00c48
|
7
|
+
data.tar.gz: c6926ffab7a700d4ef884237c0f606ed053d32e66ac97472458cc09102875df883d1cc656c55dfb6a769bc094ae7447abe6e2057bebfb9a74f6e183c57d2e625
|
data/CHANGELOG.md
CHANGED
data/lib/jekyll_tag_helper.rb
CHANGED
@@ -56,10 +56,11 @@ class JekyllTagHelper
|
|
56
56
|
|
57
57
|
# @return value of variable, or the empty string
|
58
58
|
def dereference_variable(name)
|
59
|
-
@liquid_context[name]
|
60
|
-
|
61
|
-
|
62
|
-
|
59
|
+
value = @liquid_context[name] # Finds variables named like 'include.my_variable', found in @liquid_context.scopes.first
|
60
|
+
value ||= @page[name] if @page # Finds variables named like 'page.my_variable'
|
61
|
+
value ||= dereference_include_variable(name)
|
62
|
+
value ||= ""
|
63
|
+
value
|
63
64
|
end
|
64
65
|
|
65
66
|
# Sets @params by replacing any Liquid variable names with their values
|