title: Getting access to data in jade template (to make static html)
body: <p>I am trying to pass some data to jade template to generate static content. I do not know much about node.js and express, I don't use them as backend. I use jade as a template engine and to generate static html.</p>
  
  <p>There are lot of request in jade issue list about having <a href="https://github.com/visionmedia/jade/pull/405" rel="nofollow">multi line code</a>, and the owner comments</p>
  
  <blockquote>
    <p>I'd like to promote keeping too much js out of the templates, maps etc
    can be exposed via locals</p>
    
    <p>if there's a lot of logic or objects etc within a template you should
    be using app.helpers() etc, they can still be view-only helpers but at
    least it keeps the templates cleaner</p>
  </blockquote>
  
  <p>I am not quite sure how to do this in a <a href="https://github.com/gruntjs/grunt-contrib-jade" rel="nofollow">grunt based</a> environment. Basically, if I can get access to javascript variables (which may be a text, js or json file) in my jade template, so I can use the data in my template and generate static html files. What is the best way to do this?</p>
  
  <hr>
  
  <h2>Edit</h2>
  
  <p>To clarify further, I may have data like (say in a json file)</p>
  
  <pre><code>user1 = {link: '', lbl: 'User', txt: '.... lot 0f text ....'}
  user2 = {link: '', lbl: 'User', txt: '.... lot 0f text ....'}
  </code></pre>
  
  <p>in my mixin, somehow I need to access user1, user2 etc in my jade template</p>
  
  <pre><code>.content
          +colum(user1 )
          +colum(user2 )
  
  mixin colum(d)
      .span4
          h4
              | #{d.lbl}
          p
              | #{d.txt}
  </code></pre>
  
  <p>Thanks a ton.</p>