mirror of
https://github.com/middleman/middleman.git
synced 2022-11-09 12:20:27 -05:00
initial markaby support
This commit is contained in:
parent
e9522b5504
commit
4371ade28c
2 changed files with 4 additions and 2 deletions
4
Rakefile
4
Rakefile
|
@ -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
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue