Sign in

Install handlebars-layout

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #3210
    cromo

    The topic title says all: how can I install this npm module and compile with it?

    #3221
    Tomasz DziudaTomasz Dziuda
    Moderator

    Hi,

    I do not understand a reason of your question and what do you want to achieve – could you elaborate?

    --
    Do you appreciate the support you've received today? If so, consider donating to the Publii team by clicking here; we'll be sure to use your donation to make Publii even better!

    #3232
    cromo

    Hi! Thanks for answering. I thought it was clear, my fault.

    I wish I could use helpers like this while making my theme:

    `{{#extend [partial] [context] [key=value …]}}`

    Or, also: `{{#embed}}`, `{{#block [name]}}`  and the others included in handlebars-layout npm package.

    I’m used to write themes in jinja2 and this kind of helpers would be very useful to me.

    Do you know how I should install this package in Publii in order to enable those helpers?

    Thanks again

    #3262
    Tomasz DziudaTomasz Dziuda
    Moderator

    Sorry but this kind of change cannot be made externally – it needs a changes in the core Publii files. And to be honest I do not see a necessity to add such syntax.

    Handlebars supports similar features:

    https://handlebarsjs.com/guide/partials.html#partial-parameters

    https://handlebarsjs.com/guide/partials.html#partial-contexts

    --
    Do you appreciate the support you've received today? If so, consider donating to the Publii team by clicking here; we'll be sure to use your donation to make Publii even better!

    #3278
    cromo

    Hmm, I see. Thanks! I’ll try doing my theme without these functions.

    In order to install this package, I tried to build Publii from source with npm but it failed every time. But that’s another problem, thanks again for answering.

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.