Merge pull request #2729 from jekyll/to_liquid_before_jsonify
This commit is contained in:
commit
7b9d392d6f
|
@ -155,7 +155,7 @@ module Jekyll
|
||||||
#
|
#
|
||||||
# Returns the converted json string
|
# Returns the converted json string
|
||||||
def jsonify(input)
|
def jsonify(input)
|
||||||
input.to_json
|
as_liquid(input).to_json
|
||||||
end
|
end
|
||||||
|
|
||||||
# Group an array of items by a property
|
# Group an array of items by a property
|
||||||
|
@ -254,5 +254,9 @@ module Jekyll
|
||||||
item[property.to_s]
|
item[property.to_s]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def as_liquid(item)
|
||||||
|
item.respond_to?(:to_liquid) ? item.to_liquid : item
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue