Curvea

Core Concepts

Pages

Pages define public routes and live under:

src/pages

Every page begins with:

@page

Basic page

@page

<section>
  <h1>Hello Curvea</h1>
</section>

Page data

Pages receive a page object containing structural route metadata plus matching JSON or Markdown content data when available:

<h1>{{ page.title }}</h1>
<p>{{ page.description }}</p>

Layout

Attach one layout with @use:

@page
@use Main(title=page.title)

<h1>{{ page.title }}</h1>

Page-local data

Use @data for values local to the page template:

@page

@data
headline = "Welcome"
@end

<h1>{{ headline }}</h1>

Routes

File names and directories define routes:

src/pages/Home.csc       -> /
src/pages/About.csc      -> /about
src/pages/blog/Index.csc -> /blog

Dynamic [slug] pages, Markdown content pages, and pagination can expand one page template into multiple routes.

Scaffolding

npx curvea make page About

creates both src/pages/About.csc and matching src/data/pages/about.json starter data.

Production output

Each built route is written as an index.html file under dist.