Unlike Vapor, which adopts Leaf as its own templating engine, Kitura allows support for multiple templating engines through its TemplateEngine protocol. Kitura's templating engine API provides a unified interface for multiple templating engines. Currently three templating engines are included in Kitura:
- Stencil
- Mustache
- Markdown
You'll learn about Stencil extensively in this chapter because Stencil has the best coverage and support among the three templating engines in the Kitura's developer community. Stencil works similarly to Vapor's Leaf in generating dynamic frontend web pages. The templating engine scans for variables and tags in a template file and replaces them with actual values or places control flows that render filtered content. Given Stencil's maturity, it offers a richer set of features such as...