parent
2292e4268c
commit
93c029d62e
|
@ -47,26 +47,10 @@ module Jekyll
|
||||||
self.published = true
|
self.published = true
|
||||||
end
|
end
|
||||||
|
|
||||||
if self.data.has_key?("tag")
|
self.tags = self.data.pluralized_array("tag", "tags")
|
||||||
self.tags = [self.data["tag"]]
|
|
||||||
elsif self.data.has_key?("tags")
|
|
||||||
self.tags = self.data['tags']
|
|
||||||
else
|
|
||||||
self.tags = []
|
|
||||||
end
|
|
||||||
|
|
||||||
if self.categories.empty?
|
if self.categories.empty?
|
||||||
if self.data.has_key?('category')
|
self.categories = self.data.pluralized_array('category', 'categories')
|
||||||
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
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue