This is my config (it's a Staticmatic site):
require 'susy'
ROOT = File.join(File.dirname(__FILE__), '..')
puts "Site root is: " + File.expand_path(ROOT)
output_style = :nested
project_path = ROOT # must be set for Compass to work
sass_dir = "src/stylesheets" # dir containing Sass / Compass
source files
css_dir = "site/stylesheets"
images_dir = "site/images"
# Enable relative paths to assets via compass helper functions.
relative_assets = true
Here's a bit of relevant Sass:
body
background= image_url("Dob-002-bw.jpg")
And this is the CSS that gets emitted:
body {
background: url('Dob-002-bw.jpg?'); }
The URL is not referring to the images directory as it should be.
Any ideas as to what's going on here?
Cheers,
Charles
Here's a quick output of the options hash I gathered by putting the
following in urls.rb
options.each do |k,v|
puts "#{k}: #{v}"
end
cache: true
load_paths:
config/../src/stylesheetsC:/ruby/lib/ruby/gems/1.8/gems/compass-0.8.17/frameworks/blueprint/stylesheetsC:/ruby/lib/ruby/gems/1.8/gems/compass-0.8.17/frameworks/compass/stylesheetsC:/ruby/lib/ruby/gems/1.8/gems/compass-0.8.17/frameworks/yui/stylesheetsC:/ruby/lib/ruby/gems/1.8/gems/compass-susy-plugin-0.6.3/sass
line_comments: true
style: nested
cache_location: ./.sass-cache
property_syntax:
Could this be a Staticmatic problem?
Charles
Chris, that's precisely as the layout is, but I don't get that error
message. If I intentionally give a nonexistant path to the image in my
sass, then I get the message:
body
background= image_url("foo/Dob-002-bw.jpg")
...
WARNING: 'Dob-002-bw.jpg' was not found (or cannot be read) in
config/../site/images/foo
> That should tell you where it was looking for an image if it can't find it.
> If staticmatic is not setting :css_filename when it creates a new
> Sass::Engine to process that sass file, then that would effectively disable
> the feature....
I guess that must be it then.
Cheers,
Charles