diff --git a/middleman-more/lib/middleman-more/extensions/directory_indexes.rb b/middleman-more/lib/middleman-more/extensions/directory_indexes.rb index 373df9ec..15d82428 100644 --- a/middleman-more/lib/middleman-more/extensions/directory_indexes.rb +++ b/middleman-more/lib/middleman-more/extensions/directory_indexes.rb @@ -34,8 +34,8 @@ module Middleman resources.each do |resource| # Check if it would be pointless to reroute - next if resource.path == index_file || - resource.path.end_with?(new_index_path) || + next if resource.destination_path == index_file || + resource.destination_path.end_with?(new_index_path) || File.extname(index_file) != resource.ext # Check if frontmatter turns directory_index off @@ -53,4 +53,4 @@ module Middleman end end end -end \ No newline at end of file +end