我正在使用Wintersmith沿着wintersmith-stylus和wintersmith-jade插件靜態網站。「意外標識符」當添加擴展/塊wintersmith玉內容文件
我想補充一個特定的CSS文件中的一個幫助頁面。幫助頁面基於「佈局」模板。當我嘗試使用塊樣式表插入到HTML頭,我收到以下錯誤:
Line ##: Unexpected identifier
layout.jade
doctype html
html
head
block head
link(rel="stylesheet" href="/styles/layout.css")
body
...
help.jade
---
template: layout.jade
---
//- Error inducing code
extends ./layout.jade
block head
link(rel="stylesheet" type="text/css" href="../styles/help.css")
//- end of error inducing code
...
即使我移動extends
和block head
線的元之上數據塊包含template: layout.jade
,我仍然收到相同的錯誤。在我的情況下,刪除extends ./layout.jade
導致錯誤行位置從40移動到5。
我的猜測是錯誤是由wintersmith玉插件引起的,但即使是我失去了我如何去修復它的情況。
對不起,我應該指定'layout.jade'確實位於'/ templates'中,而'help.jade'是一塊使用wintersmith-jade變得可能的'content'。 – AquaGeneral 2014-09-28 23:50:18
下面是這兩個文件的位置: layout.jade:templates/layout.jade help.jade:contents/help/index.jade 我試過你的建議,但不幸的是沒有修復它 - 甚至沒有發生錯誤行改變了。 我只注意到,如果我刪除元數據塊,錯誤與原來一模一樣 - 這是相當奇怪的。 – AquaGeneral 2014-09-28 23:58:40