diff --git a/middleman-core/lib/middleman-core/core_extensions/rendering.rb b/middleman-core/lib/middleman-core/core_extensions/rendering.rb index 894ab6a6..8b75cea1 100644 --- a/middleman-core/lib/middleman-core/core_extensions/rendering.rb +++ b/middleman-core/lib/middleman-core/core_extensions/rendering.rb @@ -76,7 +76,7 @@ module Middleman end # Certain output file types don't use layouts - needs_layout = !%w(.js .json .css .txt).include?(extension) + needs_layout = !%w(.js .json .css .txt).include?(File.extname(path)) # If we need a layout and have a layout, use it if needs_layout && layout_path = fetch_layout(engine, opts)