下面是 layout.jade 的内容:
include includes/head
body
h1 My Site
p Welcome to my super amazing site.
前面已经提到,include
可以包含比如html或者css这样的内容。给定一个扩展名后,Jade不会把这个文件当作一个Jade源代码,并且会把它当作一个普通文本包含进来:
html
body
include content.html
我们可以像下面给添加内容, 这里是添加两个脚本.
html
script(src='/foo.js')
script(src='/bar.js')
body