diff --git a/lib/jekyll/post.rb b/lib/jekyll/post.rb index 293e2c5d..d1cfb008 100644 --- a/lib/jekyll/post.rb +++ b/lib/jekyll/post.rb @@ -269,7 +269,7 @@ module Jekyll def destination(dest) # The url needs to be unescaped in order to preserve the correct filename path = Jekyll.sanitized_path(dest, URL.unescape_path(url)) - path = File.join(path, "index.html") if path[/\.html?$/].nil? + path = File.join(path, "index.html") if self.url =~ /\/$/ path end diff --git a/test/test_post.rb b/test/test_post.rb index 48e2eb03..783b5c0c 100644 --- a/test/test_post.rb +++ b/test/test_post.rb @@ -589,7 +589,7 @@ class TestPost < Test::Unit::TestCase should "write properly without html extension" do post = setup_post("2008-10-18-foo-bar.textile") - post.site.permalink_style = ":title" + post.site.permalink_style = ":title/" do_render(post) post.write(dest_dir)