From 99cc12cc0a9d46147dd9f1322d4059be82986ef4 Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Wed, 18 Jun 2014 18:10:01 -0400 Subject: [PATCH] Merge file system categories with categories from YAML. Fixes #2527 --- lib/jekyll/post.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/jekyll/post.rb b/lib/jekyll/post.rb index 9c75efc6..6cd6e938 100644 --- a/lib/jekyll/post.rb +++ b/lib/jekyll/post.rb @@ -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