Writs
A writ is an expression wrapped with {{ and }} that will be evaluated and output into the template.
oxip
Hello {{ name }}!
text
Hello Luna!
But writs support any expression:
oxip
{{ a }} + {{ b }} = {{ a + b }}
text
1 + 2 = 3
No matter how complicated:
oxip
{{ (user.name() | upper) ~ " (" ~ (user.company() | lower) ~ ")" }}
text
CASPER (sloths and stuff, inc.)
Expressions will be explained in more detail in a later chapter.
Escaping
Eventually you'll likely want to escape user-provided text for safe usage within a markup language. Set a default escaper group and manually specify the escaper anywhere the default escaper for the group won't work:
/oxiplate.toml
escaper_groups.html.escaper = "::oxiplate::escapers::HtmlEscaper"
html.oxip
<a href="/{{ attr: user.username }}" title="Visit {{ attr: user.name }}'s profile">
{{ user.name }}
</a>
html
<a href="/toya_the_sequoia" title="Visit Isabelle "Cat & Mouse" Toya's profile">
Isabelle "Cat & Mouse" Toya
</a>
Read more about escaping in the next chapter.