How to guide for Handlebars
Handlebars
Overview
In the toolkit we are using Handlebars for the HTML templating. It provides the power necessary to let us build semantic templates effectively.The data to the templates is provided by using JSON. Grunt assemble task is used to generate html from handlebars.
Creating Handlebars
- A Handlebar should be created for each component being developed.
- A partial should be created when we have a chunk of handlebar that will be useful in different contexts.
- JSON is used for inserting content into the Handlebars. We follow the one to many structure where we have a single Handlebar and many JSON using the same Handlebar.
- JSON file should be related to specific Handlebar with all the relevant properties provided like layout, handlebar filename etc.
- List of properties that could be used to configure handlebars and JSON