fix layouts with implied extensions
This commit is contained in:
parent
3399ee207e
commit
37752dc291
5 changed files with 24 additions and 5 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue