Renamed tag- and category-instantiation methods
This commit is contained in:
parent
6d9845a58b
commit
422a4bd5cd
|
@ -47,8 +47,8 @@ module Jekyll
|
||||||
|
|
||||||
self.published = self.is_published
|
self.published = self.is_published
|
||||||
|
|
||||||
self.setup_categories
|
self.populate_categories
|
||||||
self.setup_tags
|
self.populate_tags
|
||||||
end
|
end
|
||||||
|
|
||||||
def is_published
|
def is_published
|
||||||
|
@ -59,14 +59,14 @@ module Jekyll
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def setup_categories
|
def populate_categories
|
||||||
if self.categories.empty?
|
if self.categories.empty?
|
||||||
self.categories = self.data.pluralized_array('category', 'categories').map {|c| c.downcase}
|
self.categories = self.data.pluralized_array('category', 'categories').map {|c| c.downcase}
|
||||||
end
|
end
|
||||||
self.categories.flatten!
|
self.categories.flatten!
|
||||||
end
|
end
|
||||||
|
|
||||||
def setup_tags
|
def populate_tags
|
||||||
self.tags = self.data.pluralized_array("tag", "tags")
|
self.tags = self.data.pluralized_array("tag", "tags")
|
||||||
self.tags.flatten!
|
self.tags.flatten!
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue