assemble.io and gulp some built-in variables are not working

101 Views Asked by At

Hi I am trying to switch from grunt-assemble to assemble (in pair with gulp); I am using assemble 0.24.3

My current problem: some of the the built-in variables http://assemble.io/docs/Built-in-Variables.html are not working on both pages and partials, for example:

{{pagename}}

returns nothing, while {{basename}} throws an error:

Message:
    utils.expectedType is not a function
Details:
    helper: [object Object]
    fileName: C:\Progetti\myproject\source\Templates\pages\seminars.html
    files: [object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
    view: [object Object]
    domainEmitter: [object Object]
    domain: [object Object]
    domainThrown: false

Stack:
TypeError: utils.expectedType is not a function
    at Object.helpers.basename (C:\Progetti\myproject\node_modules\handlebars-helpers\lib\path.js:83:31)
    at Object.<anonymous> (C:\Progetti\myproject\node_modules\deep-bind\index.js:61:15)
    at C:\Progetti\myproject\node_modules\async-helpers\index.js:331:23
    at C:\Progetti\myproject\node_modules\co\index.js:136:8
    at new Promise (<anonymous>)
    at thunkToPromise (C:\Progetti\myproject\node_modules\co\index.js:135:10)
    at toPromise (C:\Progetti\myproject\node_modules\co\index.js:119:55)
    at next (C:\Progetti\myproject\node_modules\co\index.js:99:29)
    at onFulfilled (C:\Progetti\myproject\node_modules\co\index.js:69:7)
    at process.internalTickCallback (internal/process/next_tick.js:77:7)

By the way

<h1>{{basename}}</h1>

has been added to the index.html page file , not to seminars.html (??)

Am I missing something or doing something wrong?

[Edit]

I have to add that I am using handlebars-helpers, too (version 0.10.0)

1

There are 1 best solutions below

0
Riccardo De Contardi On

I found an answer by myself: just use:

{{basename path}}