Curvea

Assets and Runtime

Base Path

Curvea supports deploying sites under a subpath using site.basePath.

This is useful for GitHub Pages and other subdirectory deployments.

Configuration

{
  "site": {
    "basePath": "/demo-profile/"
  }
}

The engine normalizes base paths.

Examples:

"demo-profile"  -> "/demo-profile/"
"/demo-profile" -> "/demo-profile/"
"/"             -> "/"

URL rewriting

During rendering, Curvea rewrites root-relative href and src values.

Example with base path /demo-profile/:

<link rel="stylesheet" href="/assets/css/app.css">

becomes:

<link rel="stylesheet" href="/demo-profile/assets/css/app.css">

Double base path protection

If a URL already starts with the configured base path, Curvea does not add it again.

Ignored URLs

Curvea does not rewrite:

  • external URLs
  • protocol-relative URLs
  • mailto: links
  • tel: links
  • hash-only links

Dev server behavior

The dev server strips the base path internally and serves routes correctly from the configured subpath.

If visiting / while base path is not /, the dev server redirects to the configured base path.

SEO behavior

SEO URLs use site.url and site.basePath to produce correct canonical and image URLs.