Merge file system categories with categories from YAML.

Fixes #2527
This commit is contained in:
Parker Moore 2014-06-18 18:10:01 -04:00
parent 21c7f2298a
commit 99cc12cc0a
1 changed files with 2 additions and 3 deletions

View File

@ -77,9 +77,8 @@ module Jekyll
end
def populate_categories
if categories.empty?
self.categories = Utils.pluralized_array_from_hash(data, 'category', 'categories').map {|c| c.to_s.downcase}
end
categories_from_data = Utils.pluralized_array_from_hash(data, 'category', 'categories')
self.categories = (Array(categories) + categories_from_data).map {|c| c.to_s.downcase}
categories.flatten!
end