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
Example:
{{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
Examples:
{{glob 'src /files /*.md '}}
{{glob 'src /files /*. {txt,md }'}}
Include external files.
Pattern: {{include [name] [data]}}
Parameters:
[string]
- The name or path of the file in which your template is defined. (Required)[int|string|collection]
- Data you want to use inside the include.Data (collection): planet-express.json
[
"Professor Farnsworth",
"Fry",
"Bender"
]
Include (partial to be "included"): planet-express.hbs
{{sort this}}
Template:
<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 →