Lets say I have a browser open, and in JavaScript I declare a global variable.
window.myGlobalVar = \'Hello!\';
I then compile a jade templ
You can pass the names of the globals, you want to use in jade templates, with the options object to the compile function. See jade api docs: http://jade-lang.com/api/
jade.compile(template, { globals: ['globalone','globaltwo']})
See this fiddle to see it in action: http://jsfiddle.net/lchngr/J5WJb/5/