This commit is contained in:
Kris Brown 2010-01-10 16:14:25 +00:00
parent 2292e4268c
commit 93c029d62e
1 changed files with 2 additions and 18 deletions

View File

@ -47,26 +47,10 @@ module Jekyll
self.published = true
end
if self.data.has_key?("tag")
self.tags = [self.data["tag"]]
elsif self.data.has_key?("tags")
self.tags = self.data['tags']
else
self.tags = []
end
self.tags = self.data.pluralized_array("tag", "tags")
if self.categories.empty?
if self.data.has_key?('category')
self.categories << self.data['category']
elsif self.data.has_key?('categories')
# Look for categories in the YAML-header, either specified as
# an array or a string.
if self.data['categories'].kind_of? String
self.categories = self.data['categories'].split
else
self.categories = self.data['categories']
end
end
self.categories = self.data.pluralized_array('category', 'categories')
end
end