Let's start from the beginning. The purpose of using a templating engine such as Handlebars is to generate some kind of viewable content (usually HTML pages), dynamically. This encompasses a really broad range of uses, from e-mail newsletters, web apps, and really any other kind of output format around.
In this quick start, we will take a brief look at the process of creating a template with both placeholders and helper tags, and then how to run and output the contents to the page.
To get started, create a file named
index.html and add the following boilerplate code:
<!DOCTYPE HTML> <html> <head> <title>Handlebars Quickstart</title> <script src="handlebars.js"></script> </head> <body> ...