1
0
Fork 0
mirror of https://github.com/middleman/middleman.git synced 2022-11-09 12:20:27 -05:00
middleman--middleman/lib/middleman/erb.rb
2010-04-28 14:26:20 -07:00

24 lines
No EOL
459 B
Ruby
Executable file

require "erb"
module Middleman
module ERb
module Renderer
def self.included(base)
base.supported_formats << "erb"
end
def render_path(path, layout)
if template_exists?(path, :erb)
layout = false if File.extname(path) == ".xml"
erb(path.to_sym, :layout => layout)
else
super
end
end
end
end
end
class Middleman::Base
include Middleman::ERb::Renderer
end