Plain HTML with layout, but without erb extension?

Hi,

I’ve set up my Middleman project like this:

source/
|
± index.html.erb
|
± folder1/ - index.html.erb
|
± folder2/ - index.html.erb

Those html.erb files do not contain any embedded ruby, they are plain HTML (sans and tags). I needed to give them the erb extension, so that Middleman processes them using the defined layout.

Can I configure Middleman to provide .html files with layout?

Have you tried explicitly setting the layout on *.html files? Something similar to Custom Layouts described in docs:

page "/folder1/index.html", layout: "layout"

I don’t know if it works, worth trying?

1 Like