Skip to content

Commit

Permalink
small stylistic change
Browse files Browse the repository at this point in the history
  • Loading branch information
mojombo committed Dec 22, 2008
1 parent f8d76c7 commit a9f74bc
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/jekyll/post.rb
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,11 @@ def process(name)
# 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.
Expand Down

0 comments on commit a9f74bc

Please sign in to comment.