css fix
This commit is contained in:
parent
25502a1a61
commit
f3121aa7ac
1 changed files with 3 additions and 0 deletions
|
@ -72,6 +72,9 @@ class Middleman < Sinatra::Base
|
|||
get %r{/(.*).css} do |path|
|
||||
content_type 'text/css', :charset => 'utf-8'
|
||||
begin
|
||||
static_version = File.join(Dir.pwd, 'public') + request.path_info
|
||||
send_file(static_version) if File.exists? static_version
|
||||
|
||||
location_of_sass_file = defined?(MIDDLEMAN_BUILDER) ? "build" : "views"
|
||||
css_filename = File.join(Dir.pwd, location_of_sass_file) + request.path_info
|
||||
sass(path.to_sym, Compass.sass_engine_options.merge({ :css_filename => css_filename }))
|
||||
|
|
Loading…
Reference in a new issue