helpers /  Content



example helpers, not for actual use! Why do this? The goal is to inspire other concepts that build from this one.

Example helper, copies file A to path B.
Parameters: String
Default: undefined


{{copy 'a.html' '../dir/b.txt'}}


example helper: This helper is intended to be instructive, to help with creating new helpers that use these features.

Use minimatch patterns to include content from specified file or files.
Parameters: String
Default: undefined


{{glob  'src /files /*.md '}} 
{{glob  'src /files /*. {txt,md }'}} 


Include external files.

Pattern: {{include [name] [data]}}

  • name (required): [string] - The name or path of the file in which your template is defined. (Required)
  • data (optional): [int|string|collection] - Data you want to use inside the include.

Data (collection): planet-express.json

  "Professor Farnsworth",

Include (partial to be "included"): planet-express.hbs

{{sort this}}


<p>{{include "planet-express.hbs" data}}</p>

Renders to:

<p>Bender, Fry, Professor Farnsworth</p>

See the template for this page →

Find an error? Let us know →