mirror of
https://github.com/middleman/middleman.git
synced 2022-11-09 12:20:27 -05:00
fix compass filters
This commit is contained in:
parent
faa00b1318
commit
b8886b7f43
2 changed files with 17 additions and 10 deletions
|
@ -50,16 +50,6 @@ class Middleman < Sinatra::Base
|
|||
puts "== The Middleman is already standing watch on port #{port}!"
|
||||
end
|
||||
|
||||
configure do
|
||||
Compass.configuration do |config|
|
||||
config.project_path = Dir.pwd
|
||||
config.sass_dir = File.join(File.expand_path(self.views), "stylesheets")
|
||||
config.output_style = :nested
|
||||
config.images_dir = File.join(File.basename(self.public), "images")
|
||||
config.http_images_path = "/images/"
|
||||
end
|
||||
end
|
||||
|
||||
# Check for local config
|
||||
local_config = File.join(self.root, "init.rb")
|
||||
if File.exists? local_config
|
||||
|
@ -67,6 +57,19 @@ class Middleman < Sinatra::Base
|
|||
class_eval File.read(local_config)
|
||||
end
|
||||
|
||||
configure do
|
||||
Compass.configuration do |config|
|
||||
config.project_path = Dir.pwd
|
||||
config.sass_dir = File.join(File.basename(self.views), "stylesheets")
|
||||
config.output_style = :nested
|
||||
config.images_dir = File.join(File.basename(self.public), "images")
|
||||
config.http_images_path = "/images/"
|
||||
config.add_import_path(config.sass_dir)
|
||||
end
|
||||
|
||||
Compass.configure_sass_plugin!
|
||||
end
|
||||
|
||||
get /(.*)/ do |path|
|
||||
path << "index.html" if path.match(%r{/$})
|
||||
path.gsub!(%r{^/}, '')
|
||||
|
|
|
@ -14,4 +14,8 @@ Middleman.helpers do
|
|||
classes += additional unless additional.empty?
|
||||
classes.join(' ')
|
||||
end
|
||||
|
||||
def asset_url(path, tld_length = 1)
|
||||
"/#{path}"
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue