Conditional rendering

When the to: value is null, it skips the output of that template, meaning it won't get rendered at all.

I the following example, the template won't be rendered if name is undefined:

---
to: {{ name ? 'where/to/render/'~name~'.js' : null %>
---

In the following example, the template won't be rendered if the body contains a specific string:

---
to: ...
skip_if: /somebody/
---
<p>I always feel like, somebody's watching me.</p>

Last updated