parent
d4b5760002
commit
3b4151b773
|
@ -324,6 +324,9 @@ module Jekyll
|
||||||
end
|
end
|
||||||
|
|
||||||
def item_property(item, property)
|
def item_property(item, property)
|
||||||
|
@item_property_cache ||= {}
|
||||||
|
@item_property_cache[property] ||= {}
|
||||||
|
@item_property_cache[property][item] ||= begin
|
||||||
if item.respond_to?(:to_liquid)
|
if item.respond_to?(:to_liquid)
|
||||||
property.to_s.split(".").reduce(item.to_liquid) do |subvalue, attribute|
|
property.to_s.split(".").reduce(item.to_liquid) do |subvalue, attribute|
|
||||||
parse_sort_input(subvalue[attribute])
|
parse_sort_input(subvalue[attribute])
|
||||||
|
@ -334,6 +337,7 @@ module Jekyll
|
||||||
parse_sort_input(item[property.to_s])
|
parse_sort_input(item[property.to_s])
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
# return numeric values as numbers for proper sorting
|
# return numeric values as numbers for proper sorting
|
||||||
def parse_sort_input(property)
|
def parse_sort_input(property)
|
||||||
|
|
Loading…
Reference in New Issue