Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

project.cfg schema

project.cfg is the per-project config, read by the client commands (sync, build, bundle, validate). It is RON, lives in the project folder, and is optional — a missing file means all defaults.

(
    publish: ( server: "https://pad.example.com", site: "my-site" ),
    build: ( command: "npm run build", output: "dist" ),
    routing: (
        clean_urls: true,
        redirects: [ (from: "/old/:slug", to: "/new/:slug", status: 301) ],
    ),
)

Sections:

SectionPurpose
publishWhere and what to publish (sync).
buildAn optional build command run before sync.
bundleThe in-process JS/CSS bundler (bundler feature).
routingRedirects, rewrites, headers, handlers — folded into the deployment.

publish

FieldTypeDescription
serverurlServer base URL. Flag --server, env BOATRAMP_SERVER.
sitestringSite to publish to. Flag --site, env BOATRAMP_SITE.
tokenstringControl-plane token. Prefer BOATRAMP_TOKEN so it is not on disk.

build

Run before sync; its output directory is what gets published.

FieldTypeDescription
commandstringShell command to run (e.g. npm run build).
outputstringDirectory the build emits and sync publishes (e.g. dist).

bundle

The in-process bundler (Rolldown for JS/TS, lightningcss for CSS). Needs the bundler feature.

FieldTypeDefaultDescription
outdirstringdistOutput directory for bundled assets.
jslistJS/TS entry points (tree-shaken, code-split).
csslistCSS entry points (@import inlined).
minifybooltrueMinify the output.

routing

The bulk of a project’s config: redirects, rewrites, headers, SPA fallback, clean URLs, error documents, and the handler/consumer/cron/stream declarations. It is compiled and checked at sync (and by boatramp validate), then folded into the immutable deployment manifest — so it is atomic with the content and rolls back with it.

The full field-by-field schema is on its own page: Routing config schema.

Validate a project.cfg (including routing) without publishing:

boatramp validate
project.cfg: routing OK (2 redirects, 1 handler)