jade travis-ci npm

This is a fork of jade that doesn't rename the main binary and has handlebar/ember.js output support

Jade - template engine

Full documentation is at jade-lang.com

Jade is a high performance template engine heavily influenced by Haml and implemented with JavaScript for node. For discussion join the Google Group.

You can test drive Jade online here.

Build Status Dependency Status NPM version


Deprecation of implicit script/style text-only:

Jade version 0.31.0 deprecated implicit text only support for scripts and styles. To fix this all you need to do is add a . character after the script or style tag.

It is hoped that this change will make Jade easier for newcomers to learn without affecting the power of the language or leading to excessive verboseness.

If you have a lot of Jade files that need fixing you can use fix-jade to attempt to automate the process.

Command line option change:

since v0.31.0, -o is preferred for --out where we used -O before.


via npm:

$ npm install jade


Jade is a clean, whitespace sensitive syntax for writing html. Here is a simple example:

doctype 5
    title= pageTitle
      if (foo) bar(1 + 5)
    h1 Jade - node template engine
      if youAreUsingJade
        p You are amazing
        p Get on it!
        Jade is a terse and simple templating language with a
        strong focus on performance and powerful features.


<!DOCTYPE html>
<html lang="en">
    <script type="text/javascript">
      if (foo) bar(1 + 5)
    <h1>Jade - node template engine</h1>
    <div id="container" class="col">
      <p>You are amazing</p>
      <p>Jade is a terse and simple templating language with a strong focus on performance and powerful features.</p>

The official jade tutorial is a great place to start. While that (and the syntax documentation) is being finished, you can view some of the old documentation here and here


For full API, see jade-lang.com/api

var jade = require('jade');

// compile
var fn = jade.compile('string of jade', options);
var html = fn(locals);

// render
var html = jade.render('string of jade', merge(options, locals));

// renderFile
var html = jade.renderFile('filename.jade', merge(options, locals));


  • filename Used in exceptions, and required when using includes
  • compileDebug When false no debug instrumentation is compiled
  • pretty Add pretty-indentation whitespace to output (false by default)

Browser Support

The latest version of jade can be download for the browser in standalone form from here. It only supports the very latest browsers though, and is a large file. It is recommended that you pre-compile your jade templates to JavaScript and then just use the runtime.js library on the client.

To compile a template for use on the client using the command line, do:

$ jade --client --no-debug filename.jade

which will produce filename.js containing the compiled template.

Command Line

After installing the latest version of node, install with:

$ npm install jade -g

and run with

$ jade --help

Additional Resources


Implementations in other languages:




Related Repositories



Compile Jade to React JavaScript ...



Compile Jade templates to React.DOM expressions ...



HTML5 Boilerplate ported to Jade. Great as a drop and go markup skeleton for Express apps. ...



A complete and fully-functional implementation of the Jade template language for PHP ...



Converter Plugin that brings Jade support to the Jekyll blog-aware, static site generator ...

Top Contributors

tj ForbesLindesay chowey jserme conancat rauchg tricknotes caseywebdev ddlsmurf eldargab logicalparadox pgherveou stuartpb cleishm khingebjerg slang800 naltatis kizu hangtwenty masylum jeamland jiyinyiyong 3rd-Eden samccone chjj dai1741 puckey wavded mirhampt vendethiel


-   0.35.0 zip tar
-   0.34.1 zip tar
-   0.34.0 zip tar
-   0.33.0 zip tar
-   0.32.0 zip tar
-   0.31.2 zip tar
-   0.31.1 zip tar
-   0.31.0 zip tar
-   0.30.0 zip tar
-   0.29.0 zip tar
-   0.28.2 zip tar
-   0.28.1 zip tar
-   0.28.0 zip tar
-   0.27.7 zip tar
-   0.27.6 zip tar
-   0.27.5 zip tar
-   0.27.4 zip tar
-   0.27.3 zip tar
-   0.27.2 zip tar
-   0.27.1 zip tar
-   0.27.0 zip tar
-   0.26.3 zip tar
-   0.26.2 zip tar
-   0.26.1 zip tar
-   0.26.0 zip tar
-   0.25.0 zip tar
-   0.24.0 zip tar
-   0.23.0 zip tar
-   0.22.1 zip tar
-   0.22.0 zip tar