下面是 layout.jade 的内容:

  1. include includes/head
  2. body
  3. h1 My Site
  4. p Welcome to my super amazing site.

前面已经提到,include 可以包含比如html或者css这样的内容。给定一个扩展名后,Jade不会把这个文件当作一个Jade源代码,并且会把它当作一个普通文本包含进来:

  1. html
  2. body
  3. include content.html

我们可以像下面给添加内容, 这里是添加两个脚本.

  1. html
  2. script(src='/foo.js')
  3. script(src='/bar.js')
  4. body