small stylistic change

This commit is contained in:
Tom Preston-Werner 2008-12-21 20:52:41 -08:00
parent f8d76c7bee
commit a9f74bc076
1 changed files with 4 additions and 2 deletions

View File

@ -64,9 +64,11 @@ module Jekyll
# Returns <String>
def dir
path = @categories ? '/' + @categories.join('/') : ''
permalink ?
permalink.to_s.split("/")[0..-2].join("/") :
if permalink
permalink.to_s.split("/")[0..-2].join("/")
else
"#{path}" + date.strftime("/%Y/%m/%d/")
end
end
# The full path and filename of the post.