Once we've got a Jade template, we can use it to render the same page structure with a variety of data. In this recipe, we'll make use of the
contrib-jade (0.12.0) plugin in conjunction with the
data option to send data that should be used in the rendering of the template.
In this example, we'll work with the basic project structure we created in the Rendering Jade templates recipe in this chapter. Be sure to refer to it if you are not yet familiar with its contents.
The following steps take us through providing data when rendering our template, and altering our
index.jade template to make use of the provided data.
index.jadetemplate to make use of the variables provided ...