Call #to_liquid before calling #to_json in jsonify filter.

This commit is contained in:
Parker Moore 2014-08-11 20:16:42 -04:00
parent ebb4a4c1b6
commit 1666bbc52e
1 changed files with 5 additions and 1 deletions

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