lib/jekyll/post.rb in jekyll-2.1.1 vs lib/jekyll/post.rb in jekyll-2.2.0
- old
+ new
@@ -157,17 +157,19 @@
# name - The String filename of the post file.
#
# Returns nothing.
def process(name)
m, cats, date, slug, ext = *name.match(MATCHER)
+ self.categories ||= []
+ self.categories += (cats || '').downcase.split('/')
self.date = Time.parse(date)
self.slug = slug
self.ext = ext
rescue ArgumentError
path = File.join(@dir || "", name)
msg = "Post '#{path}' does not have a valid date.\n"
msg << "Fix the date, or exclude the file or directory from being processed"
- raise FatalException.new(msg)
+ raise Errors::FatalException.new(msg)
end
# The generated directory into which the post will be placed
# upon generation. This is derived from the permalink or, if
# permalink is absent, set to the default date