Try item#to_liquid before looking at the data

This commit is contained in:
Parker Moore 2014-06-08 19:33:37 -04:00
parent 27c9fce15b
commit ccee1b6a55
1 changed files with 3 additions and 1 deletions

View File

@ -247,7 +247,9 @@ module Jekyll
end
def item_property(item, property)
if item.respond_to?(:data)
if item.respond_to?(:to_liquid)
item.to_liquid[property.to_s]
elsif item.respond_to?(:data)
item.data[property.to_s]
else
item[property.to_s]