Curvea

CurveaScript

Expressions

CurveaScript expressions use double curly braces.

{{ page.title }}

Expressions resolve values from the current template scope.

Supported expressions

Normal expressions are simple property paths:

{{ title }}
{{ page.title }}
{{ site.name }}
{{ collection.items }}

Nested paths use dot notation. Curvea does not evaluate JavaScript inside interpolation.

CurrentYear

CurrentYear is a reserved Curvea runtime global:

© {{ CurrentYear }} {{ site.name }}

Use the exact casing CurrentYear. It cannot be overridden by user data.

Unsupported expressions

Unsupported expressions resolve to an empty string:

{{ page.title.toUpperCase() }}
{{ count + 1 }}
{{ items.map(item => item.title) }}
{{ user?.name }}

Missing values

A missing value also renders as an empty string:

{{ page.missingValue }}

Common scope sources

Template values can come from:

  • page data
  • @data
  • data loaded with @load
  • layout props
  • component props
  • slot
  • page
  • site
  • collection on content collection pages
  • pagination on paginated pages
  • $index inside loops
  • the reserved CurrentYear runtime global

Escaping

Normal {{ }} interpolation converts resolved values to strings and does not HTML-escape them.

Use @code when you need escaped code output.