Curvea

CurveaScript

CurveaScript Overview

CurveaScript is Curvea's HTML-first template language. Files use the .csc extension and resolve into static website output during development rendering or production builds.

File roles

Every .csc file declares exactly one role:

@page
@layout Main(title)
@component Hero(title)
@document

Components require parentheses in their declaration even when no props are declared, for example @component Divider().

Expressions

Use interpolation for simple paths:

{{ page.title }}
{{ site.name }}
{{ CurrentYear }}

Normal expressions support simple dot-separated property access. CurrentYear is the reserved runtime global and must use that exact casing.

Logic

CurveaScript provides build-time conditionals and loops:

@if page.title
  <h1>{{ page.title }}</h1>
@end
@for item in items
  <p>{{ item.title }}</p>
@end

Components

Custom components use PascalCase tags and explicit Engine imports:

@import Hero

<Hero title="Welcome" />

Browser behavior

CurveaScript is not a browser-reactive template runtime. Use standard JavaScript or Curvea's small built-in helpers for client-side behavior.