2016-03-11 113 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包括不同的部分到身體?