allow data attribute access by Liquid on Convertible items

This commit is contained in:
Aidan Feldman 2013-12-19 17:14:51 -05:00
parent 8c1706b66e
commit c2b750448e
1 changed files with 9 additions and 0 deletions

View File

@ -170,5 +170,14 @@ module Jekyll
f.write(self.output)
end
end
# Accessor for data properties by Liquid.
#
# property - The String name of the property to retrieve.
#
# Returns the String value or nil if the property isn't included.
def [](property)
data[property]
end
end
end