fix double slash caused by empty categories

This commit is contained in:
Tom Preston-Werner 2008-12-21 21:26:33 -08:00
parent bb676556a8
commit fd88a56c55
1 changed files with 1 additions and 1 deletions

View File

@ -63,7 +63,7 @@ module Jekyll
#
# Returns <String>
def dir
path = @categories ? '/' + @categories.join('/') : ''
path = (@categories && !@categories.empty?) ? '/' + @categories.join('/') : ''
if permalink
permalink.to_s.split("/")[0..-2].join("/")
else