I'm using node.js+express for serving static files (CSS+JS). At this time static dir is configured as
app.use(express.static(__dirname + '/static'));
In main templeate layout.jade I load static files as
link(href='css/bootstrap.css', rel='stylesheet')
Everything works fine with pages like /hello, /write, /:user. But when I get pages like /bob/505b6833d3835d3705000001/edit, static files cannot be found. Firebug shows Node generates the same path for static, but styles are not applied for the page. Why? Thanks in advance!
You should be using link with pre-slash.
link(href='/css/bootstrap.css', rel='stylesheet')
This should take care of it.