From b91d13c0cd076fdd31e0292e298bbc5b9b209c3f Mon Sep 17 00:00:00 2001 From: tdreyno Date: Tue, 29 Sep 2009 15:04:41 -0700 Subject: [PATCH] enable partials --- lib/middleman/base.rb | 6 ++++++ lib/middleman/features/haml.rb | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/middleman/base.rb b/lib/middleman/base.rb index 95cb99f6..72bbcab6 100644 --- a/lib/middleman/base.rb +++ b/lib/middleman/base.rb @@ -3,6 +3,11 @@ require 'haml' require 'sinatra/base' require 'middleman/helpers' +def mime(ext, type) + ext = ".#{ext}" unless ext.to_s[0] == ?. + Rack::Mime::MIME_TYPES[ext.to_s] = type +end + module Middleman class Base < Sinatra::Base set :app_file, __FILE__ @@ -28,6 +33,7 @@ module Middleman # include helpers helpers Middleman::Helpers + # Default build features configure :build do enable :minify_css enable :minify_javascript diff --git a/lib/middleman/features/haml.rb b/lib/middleman/features/haml.rb index 0050e516..0c2018e7 100644 --- a/lib/middleman/features/haml.rb +++ b/lib/middleman/features/haml.rb @@ -2,7 +2,7 @@ module Middleman module Haml def self.included(base) base.supported_formats << "haml" - # base.helpers Middleman::HamlHelpers + base.helpers Middleman::HamlHelpers end def render_path(path)