initial markaby support

This commit is contained in:
tdreyno 2009-07-28 08:35:13 -07:00
parent e9522b5504
commit 4371ade28c
2 changed files with 4 additions and 2 deletions

View file

@ -14,6 +14,7 @@ begin
gem.executables = %w(sm-init sm-build sm-server)
gem.add_dependency("templater")
gem.add_dependency("sinatra")
gem.add_dependency("sbfaulkner-sinatra-markaby")
gem.add_dependency("haml", ">=2.1.0")
gem.add_dependency("chriseppstein-compass")
end
@ -51,5 +52,4 @@ Rake::RDocTask.new do |rdoc|
rdoc.title = "middleman #{version}"
rdoc.rdoc_files.include('README*')
rdoc.rdoc_files.include('lib/**/*.rb')
end
end

View file

@ -2,6 +2,7 @@ require 'rubygems'
require 'haml'
require 'compass' #must be loaded before sinatra
require 'sinatra/base'
require 'sinatra/markaby'
class Middleman < Sinatra::Base
set :app_file, __FILE__
@ -53,6 +54,7 @@ class Middleman < Sinatra::Base
if path.match /.html$/
haml(path.gsub('.html', '').to_sym)
#markaby
elsif path.match /.css$/
content_type 'text/css', :charset => 'utf-8'
sass(path.gsub('.css', '').to_sym, Compass.sass_engine_options)