Jade is a clean, terse template language. It uses significant whitespace to denote block and element hierarchy. It supports many advanced features, for example, mixins, which are subtemplates and blocks, which are template sections replaceable by inheritance.
In this recipe, we're going to render a simple greeting using Jade. Later on in this chapter, we're going to look at some of the more advanced features.
We need to download
jade.min.js in our
recipe folder, available at https://github.com/visionmedia/jade.
Let's get started.
index.html, it will contain a small form asking the user for his or her name, a placeholder to render the greeting, and the greeting template:
<!DOCTYPE HTML> ...