Creating templates

A template allows you to produce different output from the same snippet.

If you aren’t familiar with the concept of templates, imagine you’d like to create a snippet to greet your users. Without templates, you’d need to create a separate snippet for each user.

Jack's snippet
Hello Jack
Nancy's snippet
Hello Nancy

You get the idea.

With templates, you can create a single snippet for all your users by treating their name as a placeholder.

Everyone's snippet
Hello {{ name }}

The value of the placeholder can be passed as a parameter when the snippet is rendered. This allows you to produce different output from the same snippet.

Of course, you can do more than just replace names. Jahuty supports the Liquid templating language, which supports many powerful features like variables, filters, controls, and loops.

Find a typo? Something is wrong in this documentation? Fork and edit it!