From a9f74bc076c03ff9e077523f1338e75043d16868 Mon Sep 17 00:00:00 2001 From: Tom Preston-Werner Date: Sun, 21 Dec 2008 20:52:41 -0800 Subject: [PATCH] small stylistic change --- lib/jekyll/post.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/jekyll/post.rb b/lib/jekyll/post.rb index 9f1eec1f..9bd624f9 100644 --- a/lib/jekyll/post.rb +++ b/lib/jekyll/post.rb @@ -64,9 +64,11 @@ module Jekyll # Returns 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.