title: Jade templating, variable scope in includes
body: <p>I am using Jade (without Express, just for static HTML templating) - which I understood as able to create partials, meaning scope is not an issue, but this doesn't seem to be the case and I can find no reference to this use-case.</p>
  
  <p><strong>master.jade</strong></p>
  
  <pre><code>!!! 5
  html
    block vars
    - var slug= 'home'
    head
      block pagetitle
        title Static HTML
      link(rel='stylesheet', href='css/styles.css')
    body(class= slug)
      .wrapper
        include includes/header
  </code></pre>
  
  <p><strong>includes/header.jade</strong></p>
  
  <pre><code>.header 
    ul
      li(class= slug)
  </code></pre>
  
  <p>I have tried syntax variants including <code>#{slug}</code> and always get the error "slug is not defined" within the <code>includes/header.jade</code> file - is it possible to do this?</p>
  
  <p><strong>EDIT:</strong> So the answer as given by Dave Weldon in the comments below is that the variable is available when included in master.jade but my build command compiled <strong>all</strong> jade files including the includes on their own, at which point the variable is of course not defined.</p>