fix double slash caused by empty categories
This commit is contained in:
parent
bb676556a8
commit
fd88a56c55
|
@ -63,7 +63,7 @@ module Jekyll
|
||||||
#
|
#
|
||||||
# Returns <String>
|
# Returns <String>
|
||||||
def dir
|
def dir
|
||||||
path = @categories ? '/' + @categories.join('/') : ''
|
path = (@categories && !@categories.empty?) ? '/' + @categories.join('/') : ''
|
||||||
if permalink
|
if permalink
|
||||||
permalink.to_s.split("/")[0..-2].join("/")
|
permalink.to_s.split("/")[0..-2].join("/")
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue