fix layouts with implied extensions

This commit is contained in:
Thomas Reynolds 2013-06-24 13:39:14 -07:00
parent 3399ee207e
commit 37752dc291
5 changed files with 24 additions and 5 deletions

View file

@ -154,11 +154,8 @@ module Middleman
end
end
# Certain output file types don't use layouts
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)
if layout_path = fetch_layout(engine, opts)
content = render_individual_file(layout_path, locs, opts, context) { content }
end