title: Nunjucks rendering file paths relative to route being called and overriding express.static setting
body: <p>Using Nunjucks with Node</p>
  
  <p>Trying to figure out a graceful solution to the following problem. With a directory tree sorda like this:
  <code>
  app_dir
  --app.js
  --public
  ----stylesheets
  ------mystyles.css
  --views
  ----page.html
  ----templates
  ------page_template.html
  </code></p>
  
  <ol>
  <li>Have static files like CSS inside my public directory 
  <code>app.use(express.static(path.join(__dirname, 'public')));</code></li>
  <li><p>Have the root directory of Nunjucks configured as views
  <code>nunjucks.configure('views', {
  autoescape: true,
  express   : app,
  watch: true
  });</code></p></li>
  <li><p>When I am referencing a css file from within page_template.html, nunjucks (I think) automagically creates a relative path based on the route and overrides the static behavior. </p></li>
  </ol>
  
  <p>For example, when I use <code>/stylesheets/mystyles.css</code> path on page_template.html but call the file that extends it using 
  <code>/:publication/:page</code> path, the rendered html is  <code>/:publication/:page/stylesheets/mystyle.css</code></p>
  
  <p>I can always write a quick hack that creates relative paths to CSS and other resources based on the route but that doesn't feel like a particularly graceful solution :( Any help much appreciated. </p>