Closed heliostatic closed 14 years ago
Specifically, it's web_path
inside page.rb that's causing the problem. Worse yet, it'll take a complicated regex to fix it. =[
I think a more simple fix can be made here.
I have something in mind - I'll see what I can do over the weekend.
I have a fix, though not the most elegant (it feels like PHP...)
def web_path(path)
return path.gsub(self.class.path, '').gsub(/\/\d+\./, '/') if File.directory?(path)
path.slice(0, path.rindex('/') + 1).gsub(self.class.path, '').gsub(/\/\d+\./, '/') + File.basename(path)
end
So do I. Just about to finish the specs.
Change asset files to cleanup the path to a file but not the filename itself. This is a more expectant result and also allows for asset filenames like 001.jpg
. Closed by 7ca62989c07570bbad8dcd5563d08798a2a15f07
Resolved in HEAD. This will be released as 1.3.0 shortly, just waiting to see if any other changes are required.
http://github.com/benschwarz/bonsai/commit/7ca62989c07570bbad8dcd5563d08798a2a15f07
Something in page.rb is ignoring filetype when looking at filename to assess hierarchy, so that images, for example, named "1.jpg" will be copied to the output directory as "jpg" and can't be served properly.