lib/vitrine.rb in vitrine-0.0.3 vs lib/vitrine.rb in vitrine-0.0.4

- old
+ new

@@ -106,10 +106,16 @@ raise "No template for either #{specific_view.inspect} or #{view_index.inspect}" end # Auto-pick the template engine out of the extension template_engine = File.extname(template_path).gsub(/^\./, '') - render(template_engine, File.read(template_path), :layout => :layout) + + render(template_engine, File.read(template_path), :layout => get_layout) + end + + def get_layout + layouts = Dir.glob(File.join(settings.views, 'layout.*')) + layouts.any? ? :layout : false end # Try to find SCSS replacement for missing CSS get /(.+)\.css/ do | basename | begin \ No newline at end of file