Introducing the Tera template
In web applications, there's usually a part that works as a web template system. Web designers and web developers can create web templates, and the web application generates HTML pages from the templates.
There are different kinds of web templates: server-side web templates (in which the template is rendered on the server-side), client-side web templates (where client-side applications render the template), or hybrid web templates.
There are a couple of templating engines in Rust. We can find templating engines for web development (such as Handlebars, Tera, Askama, or Liquid) at https://crates.io or https:/lib.rs.
The Rocket web framework has built-in support for templating in the form of the rocket_dyn_templates
crate. Currently, the crate only supports two engines: Handlebars and Tera. In this book, we are going to use Tera as the template engine to simplify the development, but feel free to try the Handlebars engine as well.
Tera is...