Merge pull request #2729 from jekyll/to_liquid_before_jsonify

This commit is contained in:
Parker Moore
2014-08-12 11:18:30 -04:00

View File

@@ -155,7 +155,7 @@ module Jekyll
#
# Returns the converted json string
def jsonify(input)
input.to_json
as_liquid(input).to_json
end
# Group an array of items by a property
@@ -254,5 +254,9 @@ module Jekyll
item[property.to_s]
end
end
def as_liquid(item)
item.respond_to?(:to_liquid) ? item.to_liquid : item
end
end
end