2016-03-11 70 views
0

我现在在我的index.jade文件:多包括JADE文件

html 
    include head 
body 
    include header 
    include main 
    include aside 
    // a bunch of other includes 
    include footer 

我喜欢收到什么

html 
    include head.jade 
body 
    +multiinclude('header','main','aside','footer') 

但是,当我试图通过在混入参数包括指令它不工作:

mixin multiinclude(...includes) 
    each i in includes 
    include= i 

它只是增加<include>header</include>标签

回答

0

您正在向您传递字符串multiinclude mixin。

你也试图循环你的输入,但它们不是数组格式。

也许你应该包括一个body.jade文件,并在body.jade包括不同的部分到身体?