Documentation for the helpers in the handlebars-helpers library. If you find any errors or have suggestions for improvement please let us know. Contributors are welcome!
Get the helper generator → for Assemble.
{{glob}}
helper for an example.assemble: { options: { prettify: { indent: 2 }}}
The simplest way to contribute is to show your support by starring the project!
Contributors welcome! Please consider adding your helpers to this library!
Handlebars makes it pretty easy to add custom helpers. Just register your function into Handlebars with the Handlebars.registerHelper
method and that helper will be available to any template you compile afterwards.
Handlebars.js ships with some built-in helpers, such as {{#each}}
, {{#if}}
and {{#unless}}
. Here is how helpers work:
Handlebars.js is currently the default template library for assemble.
Handlebars allows two different kinds of helpers:
{{#each}}
, {{#if}}
and {{#unless}}
. Custom block helpers are registered the same way as exptression helpers,
but the difference is that Handlebars will pass the contents of the block compiled into a function to the helper.Learn about adding custom helpers to Assemble.
Thanks to Dan Harper and Elving Rodriquez! Many of these helpers originated in the following repos:
See the template for this page →
Find an error? Let us know →