Skip to content

Commit

Permalink
fixed jekyll#73 and jekyll#84
Browse files Browse the repository at this point in the history
  • Loading branch information
krisb committed Jan 10, 2010
1 parent 2292e42 commit 93c029d
Showing 1 changed file with 2 additions and 18 deletions.
20 changes: 2 additions & 18 deletions lib/jekyll/post.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,26 +47,10 @@ def initialize(site, source, dir, name)
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

Expand Down

0 comments on commit 93c029d

Please sign in to comment.