let
Declares named constants. Each binding is read back by writing {{name}} — a compile-time splice of the value as text, which works anywhere the source is read: prose, attribute values, code bodies. The attribute group IS the bindings, so has no attributes of its own and no shorthand form (:x is an error). For tables of values, declare a dataset instead.
Writing with it:Source style
#Examples
@let(source-note: Johnson & Raven (1973))
As reported in {{source-note}}.@let(
sample-size: 240
site: Baltra
)
We surveyed {{sample-size}} plants on {{site}}.#Notes
- A splice is textual and happens before parsing, so
{{…}}is not an element and cannot be styled or nested. A value that changes at render time cannot be spliced — read it with a binding instead. bodyanddetailare reserved across the constant namespace — inside an@definetemplate they name the use's own{...}and[...]sections. Binding either as a constant is a compile error (D6).