dust.js - Dust partials rendering error in DocPad -
i'm using docpad docpad-plugin-consolidate , dustjs-linkedin.
my document file src/documents/test.html.dust:
--- layout: ltest --- main content!
the following template src/layouts/ltest.html.dust works fine:
content {content}
i want use dust partials in layout template in following way:
{>"header"/} content {content} {>"footet"/}
and place templates header.dust , footer.dust somewhere nearby. got error:
warning: went wrong while rendering: ltest.html.dust
a task's completion callback has fired when task in completed state, unexpected
warning: went wrong while rendering: test.html.dust
a task's completion callback has fired when task in completed state, unexpected
error: error occured:
error: task's completion callback has fired when task in completed state, unexpected
how fix error?
upd1. created simplest example show error (on windows):
- _http://nodejs.org/dist/v0.10.26/x64/node.exe
- _http://nodejs.org/dist/npm/npm-1.4.3.zip
- npm install docpad@6.64
- mkdir test
- cd test
- docpad run
- ; no skeleton (20) selected; exit after run
- docpad install consolidate
- npm install dustjs-linkedin
- docpad run
- ; visit _http://localhost:9778/test.html
here files: src/documents/test.html.dust
--- layout: ltest --- main content!
src/layouts/ltest.html.dust
content: {content}
until works fine.
but following files goes wrong.
src/layouts/ltest.html.dust
{>"src/layouts/header.dust"/} content: {content}
src/layouts/header.dust
this header
there no errors, output has no transformations. debugger found (in dust.js 753) function chunk.prototype.partial called proper parameters , processed fine, result lost somewhere.
so problem docpad failed work partials files in dust templates.
can post header , footer templates?
also, have typo in ltest.html.dust says "footet" instead of "footer". don't know if make difference though.
Comments
Post a Comment