Call #to_liquid before calling #to_json in jsonify filter.
This commit is contained in:
parent
ebb4a4c1b6
commit
1666bbc52e
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue