diff --git a/lib/jekyll/post.rb b/lib/jekyll/post.rb index b13deff8..293e2c5d 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 path[/\.html?$/].nil? path end