Curvea

SEO

Sitemap

Curvea can generate a static XML sitemap from the routes produced by a production build.

Enable sitemap generation

From a project with local @curvea/cli installed:

npx curvea add sitemap

This enables the project feature flag:

{
  "curvea": {
    "features": {
      "sitemap": true
    }
  }
}

Configure the site URL

Sitemap generation requires an absolute site.url:

{
  "site": {
    "url": "https://example.com"
  }
}

site.basePath is included when Curvea constructs absolute route URLs.

Build

npm run build

When the feature is enabled, Curvea writes:

dist/sitemap.xml

The sitemap contains the unique routes produced by that build, including generated dynamic, content, and pagination routes.

If site.url is empty while sitemap generation is enabled, the build fails with a configuration error.