Configuration
Use CLI flags for one-off publishes. Add .stattic/config.json when space metadata should travel with a directory publish.
{
"title": "docs",
"mode": "website",
"spa": true,
"viewer": {
"title": "Product docs",
"description": "Static docs hosted on Stattic"
}
}
Mode and SPA
mode is website or files. Website mode serves index.html as the homepage when it is present. --spa auto enables SPA fallback when the publish looks like a built client app, includes a root index.html, and does not include _redirects.
For Vite spaces, the Stattic Vite plugin is optional. It gives local dev parity for _redirects and _headers, can generate routing files from vite.config.ts, and validates static-site builds. The platform still accepts plain build output without code changes. See Vite and TanStack Start.
Metadata
title sets the space title. viewer.title, viewer.description, and viewer.ogImagePath control generated viewer metadata.
Password protection
Use stattic password set and stattic password clear for password management. Config-file password can enable or replace the space password during publish.
stattic metadata patch --mode website --spa true
printf '%s\n' "$PASSWORD" | stattic password set --stdin
stattic password clear