That way the following will produce valid HTML: @@ layout !!! = yield @@ content %html %head= haml :head %body= haml :body That way using render methods for partials is a lot easier. Tests included.