diff --git a/content/(account)/api-keys.mdx b/content/(account)/api-keys.mdx index dfb59f9..3a5ede6 100644 --- a/content/(account)/api-keys.mdx +++ b/content/(account)/api-keys.mdx @@ -57,7 +57,7 @@ A preset is a named bundle of permissions. Pick the narrowest one that does the | `billing_viewer` | Billing viewer | Read team and billing information, nothing else | | `team_admin` | Team admin | Everything this team can do | -`space_publisher` and `ci_deploy` carry the same publish permissions. `space_admin` is the default when a request names no preset. It deliberately stops short of `team_admin`: it can never mint keys, manage members, or touch billing. +`space_publisher` and `ci_deploy` carry the same publish permissions. `space_admin` is the default when a request names no preset. Unlike `team_admin`, it can't create keys, manage members, or change billing. ## How permissions compile diff --git a/content/(account)/authentication.mdx b/content/(account)/authentication.mdx index 841f1f4..1ec87f0 100644 --- a/content/(account)/authentication.mdx +++ b/content/(account)/authentication.mdx @@ -5,7 +5,7 @@ sidebar: order: 1 --- -Creating a Spacefast account takes nothing but an email address and a six-digit code — no password required until you add one later. +To create a Spacefast account, you need an email address and the six-digit code sent to it. A password is optional, and you can add one later. ## Create an account @@ -115,7 +115,7 @@ Sessions are separate from agent access. To cut off an agent or a CLI, use **Acc -Facts worth knowing about that credential: +About that credential: | Fact | Value | |---|---| diff --git a/content/(account)/billing.mdx b/content/(account)/billing.mdx index 21fe626..1787320 100644 --- a/content/(account)/billing.mdx +++ b/content/(account)/billing.mdx @@ -5,7 +5,7 @@ sidebar: order: 3 --- -Prices, allowances and limits for every plan are on [Pricing & Limits](/pricing). This page covers managing a plan. +Manage your plan here. Prices, allowances, and limits for every plan are on [Pricing & Limits](/pricing). ## Upgrade, downgrade or cancel diff --git a/content/(account)/usage.mdx b/content/(account)/usage.mdx index c44e74a..cb40feb 100644 --- a/content/(account)/usage.mdx +++ b/content/(account)/usage.mdx @@ -5,7 +5,7 @@ sidebar: order: 4 --- -Allowances, unit prices and what each meter counts are on [Pricing & Limits](/pricing). This page covers reading your current usage. +Check your current usage here. Allowances, unit prices, and what each meter counts are on [Pricing & Limits](/pricing). ## Read current usage diff --git a/content/(concepts)/spaces.mdx b/content/(concepts)/spaces.mdx index 65bb3ab..42d6297 100644 --- a/content/(concepts)/spaces.mdx +++ b/content/(concepts)/spaces.mdx @@ -133,7 +133,7 @@ What changes: - The old slug stays reserved for this Space. - Version URLs do not move. They were computed once and stored. -One thing blocks a rename. While `name` is set in your `sf.jsonc`, the API refuses to rename the Space — the file would win back the old name on the next publish. Remove the key or rename it in the file. See [Config file](/config-file). +One thing blocks a rename. While `name` is set in your `sf.jsonc`, the API refuses to rename the Space, because the next publish would set the old name again. Remove the key or rename it in the file. See [Config file](/config-file). ## Deleting and restoring diff --git a/content/(concepts)/versions.mdx b/content/(concepts)/versions.mdx index e54bcb1..32c8cd0 100644 --- a/content/(concepts)/versions.mdx +++ b/content/(concepts)/versions.mdx @@ -54,9 +54,9 @@ sf channels set live --promotion manual --space docs ## Promote and roll back -Promoting points `live` at a ready version. That is the whole operation. No files move, nothing is rebuilt, and the previous version keeps its own URL. +Promoting points `live` at a ready version. No files move, nothing is rebuilt, and the previous version keeps its own URL. -Rolling back is the same operation aimed backwards. There is no separate rollback mechanism, and no rebuild happens either way. The dashboard says it plainly: **Takes effect in seconds. Nothing is rebuilt.** +Rolling back is the same operation, pointed at an older version. Neither one rebuilds anything, and both take effect in seconds. diff --git a/content/(dynamic)/database.mdx b/content/(dynamic)/database.mdx index a77a1fc..ce3eb7c 100644 --- a/content/(dynamic)/database.mdx +++ b/content/(dynamic)/database.mdx @@ -5,7 +5,7 @@ sidebar: order: 2 --- -There's no connection string for this database — your code reaches it through `ctx.db` or `env.DB`, or through a single-use SQL console when you need raw SQL. +This database has no connection string. Your code reaches it through `ctx.db` or `env.DB`, or through a single-use SQL console when you need raw SQL. :::note[Don't have a database yet?] For [Zero](/zero-runtime), start with `sf init --runtime zero`, or add the full [runtime block](/zero-runtime#declare-it) to `sf.jsonc`, including `kind: "zero"`, `server`, and `client` entry paths. The server file is required; Zero can generate a client shell. Publish the app before querying its live database. A [Functions](/functions#what-is-on-env) worker also gets a database through `env.DB`, but the Zero table commands do not apply to it. diff --git a/content/(dynamic)/wordpress.mdx b/content/(dynamic)/wordpress.mdx index 8457f5e..13e51d2 100644 --- a/content/(dynamic)/wordpress.mdx +++ b/content/(dynamic)/wordpress.mdx @@ -5,7 +5,7 @@ description: Every Space runs a WordPress behind its static files. Run WP-CLI ag Every Space includes a WordPress install behind its published files. Reach it through `sf wp` or its published Abilities. -Your published files serve in front of WordPress, so a static Space never touches it and never pays for it. It is there because it is what makes a Space more than a bucket: [Zero](/zero-runtime) apps run on it, [Storage](/object-storage) is its media library, and [Database](/database) is its MySQL. This page covers the two ways to reach that WordPress directly. +Your published files are served in front of WordPress, so a static Space never uses it or pays for it. WordPress runs the dynamic features: [Zero](/zero-runtime) apps run on it, [Storage](/object-storage) is its media library, and [Database](/database) is its MySQL. You can reach it directly in two ways. ## `sf wp` @@ -21,7 +21,7 @@ Everything after `sf`'s own flags is handed to `wp` unchanged. `--format=csv` ab ### The `--` rule -`sf` stops claiming flags at the first token that is not one of its own, and `--` ends the argument outright. So a `wp` flag can never collide with an `sf` flag by accident. A `wp` command that genuinely needs `--path` or `--space` is still reachable — just put it after `--` or after any positional. +`sf` stops claiming flags at the first token that is not one of its own, and `--` ends the argument outright. So a `wp` flag can't collide with an `sf` flag by accident. To pass `--path` or `--space` to `wp`, put it after `--` or after any positional argument. ```bash sf wp -- --version diff --git a/content/(publish)/anonymous-and-claim.mdx b/content/(publish)/anonymous-and-claim.mdx index ff4e800..362b63d 100644 --- a/content/(publish)/anonymous-and-claim.mdx +++ b/content/(publish)/anonymous-and-claim.mdx @@ -34,7 +34,7 @@ The key is returned once, at creation, and once more if you rotate it. The CLI c CLI and MCP receipts include the preview URL, claim link, and message for you to relay. CI masks these links. The separate Space key is never printed on its own. -The claim link is a fragment URL on purpose. Browsers never send a fragment to a server, so the key reaches the claim page without being logged anywhere in between. +The key is in the claim link's URL fragment. Browsers don't send fragments to servers, so the key reaches the claim page without being logged on the way. From the dashboard, **Drop** does the same thing while signed out. The eyebrow reads **Anonymous drop · Claim it later**, and the result carries a **Claim this space** button. diff --git a/content/(publish)/ci.mdx b/content/(publish)/ci.mdx index 5616107..1acbc7d 100644 --- a/content/(publish)/ci.mdx +++ b/content/(publish)/ci.mdx @@ -95,13 +95,13 @@ GitHub Actions and GitLab CI both set `CI` for you, and a truthy `CI` puts the C | Change | Detail | | --- | --- | -| `--json` is appended | Every command prints `{ data }` on stdout, `{ error }` on stderr. Passing `--json` yourself is redundant, and worth writing anyway so the pipeline reads the same locally | -| Prompts are off | The CLI never asks a question it cannot get an answer to | -| `--yes` is still yours | Agent mode never implies it | +| `--json` is appended | Every command prints `{ data }` on stdout, `{ error }` on stderr. Pass `--json` anyway so the command behaves the same when you run it locally | +| Prompts are off | The CLI doesn't prompt | +| `--yes` is not implied | Agent mode doesn't add it | -That last one bites. A destructive command in CI without `--yes` fails with `confirmation_required` and exit code 2, every time. Add `--yes` to the command that needs it rather than setting it globally. +A destructive command in CI without `--yes` fails with `confirmation_required` and exit code 2. Add `--yes` to the command that needs it rather than setting it globally. -Credentials also behave differently under `CI`. The plaintext credential store is the default there, so a locked or absent OS keyring never wedges a job. +Credentials also behave differently under `CI`. The plaintext credential store is the default there, so a locked or missing OS keyring doesn't block a job. ## Version provenance @@ -129,7 +129,7 @@ A preview on an existing Space refuses `--name`, `--mode`, and a non-`auto` `--s ## Reading the receipt -The fields worth branching on in a script: +The fields a script usually checks: | Field | Use | | --- | --- | diff --git a/content/(publish)/frameworks.mdx b/content/(publish)/frameworks.mdx index 838b6a1..e51ae11 100644 --- a/content/(publish)/frameworks.mdx +++ b/content/(publish)/frameworks.mdx @@ -184,7 +184,7 @@ Logs are capped at 500 entries and 512 KiB per build. Past that the oldest entri | Per-phase timeout | 180 seconds | | Build output archive | 512 MiB by default | -Your build commands are never retried automatically. A crashed run fails the build deterministically instead of silently running your commands a second time. Only infrastructure failures that happen before the build starts are requeued, at most twice. +Spacefast doesn't retry your build commands. If a run crashes, the build fails instead of running your commands again. Only infrastructure failures that happen before the build starts are requeued, at most twice. Retrying is explicit and makes a **new** build, linked back to the original and reusing its exact input and settings snapshot. @@ -224,7 +224,7 @@ export default defineConfig({ }); ``` -Same routing conventions as the Astro integration, plus a check that the build is actually publishable. `mode` defaults to `static`, and a static build with no `.html` file anywhere in the output fails rather than deploying a blank site. `mode: "spa"` writes an `/index.html` fallback for `/*` instead. A `build.ssr` config is refused outright unless you pass `allowSsrBuild`. Needs Vite 6 or newer. TanStack Start has its own entry point at `@spacefast/vite-plugin/tanstack-start`. +Same routing conventions as the Astro integration, plus a check that the build can be published. `mode` defaults to `static`, and a static build with no `.html` file anywhere in the output fails rather than deploying a blank site. `mode: "spa"` writes an `/index.html` fallback for `/*` instead. A `build.ssr` config is refused outright unless you pass `allowSsrBuild`. Needs Vite 6 or newer. TanStack Start has its own entry point at `@spacefast/vite-plugin/tanstack-start`. ### `@spacefast/next-adapter` diff --git a/content/(publish)/git.mdx b/content/(publish)/git.mdx index b82d249..5940073 100644 --- a/content/(publish)/git.mdx +++ b/content/(publish)/git.mdx @@ -7,9 +7,9 @@ sidebar: Keep your source in Git and publish from a Spacefast remote or a connected GitHub repository. Connected repository pushes queue builds only when auto-deploy is enabled for that branch; deleting a branch does not build it. -Two lanes. The Spacefast remote needs no external host and no app install. A GitHub connection keeps your repository where it is and reacts to its webhooks. +There are two ways to connect. The Spacefast remote needs no external Git provider and no app install. A GitHub connection keeps your repository where it is and reacts to its webhooks. -The `sf git` and `sf source` command families name the same two connection types in different words — on purpose, not a typo. +The `sf git` and `sf source` command families use different names for the same two connection types. ## Source and deployment files diff --git a/content/(publish)/publish.mdx b/content/(publish)/publish.mdx index 27199e9..b7fa023 100644 --- a/content/(publish)/publish.mdx +++ b/content/(publish)/publish.mdx @@ -1,6 +1,6 @@ --- title: Publishing -description: What one sf publish actually does, which files it sends, how change-only uploads work, and what the receipt tells you +description: What one sf publish does, which files it sends, how change-only uploads work, and what the receipt tells you sidebar: order: 1 --- @@ -64,7 +64,7 @@ Publishing walks the directory and builds a manifest. Three things can happen to ### Dropped without complaint -Some paths are never worth failing a whole publish over, so they are dropped and counted instead. Exact names at any depth: +Some paths are dropped and counted instead of failing the publish. Exact names at any depth: ```text .DS_Store .gitignore .npmrc .netrc @@ -93,7 +93,7 @@ These fail the publish rather than getting dropped, because silently ignoring th | Under a runtime control prefix, such as a top-level `__sf` or `__spacefast` | `static_runtime_control_path_not_supported` | | Two entries that canonicalize to the same path | `manifest_duplicate_path` | -Two artifacts claiming the same request route also stop the publish, so a lookup-order coin flip never decides which one visitors get. +Two artifacts that claim the same request route also stop the publish, so visitors never get an arbitrary one of them. ### Size and count @@ -117,7 +117,7 @@ Every declared file carries a `sha256`. The server compares your declaration aga { "upload": 3, "reused": 41, "ignored": 0 } ``` -Deleting a file means leaving it out of the declaration. There is no delete list. That has one consequence worth knowing: +Deleting a file means leaving it out of the declaration. There is no delete list, which has one consequence: | Mode | What your file list means | | --- | --- | @@ -136,7 +136,7 @@ noop_publish That diagnostic is the only signal. There is no separate boolean. -One catch. A file declared without a `sha256` cannot prove it is unchanged, so a manifest missing any hash always materializes a new version. +A file declared without a `sha256` can't be shown to be unchanged, so a manifest missing any hash always creates a new version. ## Waiting, or not @@ -148,7 +148,7 @@ On the CLI it is `--wait` (on by default), `--no-wait`, and `--wait-timeout` in ## Reading the receipt -The parts you actually read: +The fields you'll use most: | Field | What it tells you | | --- | --- | @@ -208,7 +208,7 @@ An archive that needs a build returns a receipt with a `build` object and `next. | `slug_reserved`, `slug_unavailable` | The slug you asked for is taken or held | Take the `details.suggestion` | | `space_selection_conflict` | You passed both a Space and a creation-only flag such as `--access` | Drop the creation flag | -Every code, with whether it is worth retrying, is on [Error codes](/api/errors). +Every code, and whether to retry it, is on [Error codes](/api/errors). ## Next steps diff --git a/content/(publish)/recipes/astro.mdx b/content/(publish)/recipes/astro.mdx index 0f85f9d..e3002ff 100644 --- a/content/(publish)/recipes/astro.mdx +++ b/content/(publish)/recipes/astro.mdx @@ -54,7 +54,7 @@ export default defineConfig({ ## The gotcha -The integration's `failOnRoutingError` defaults to `true`. A malformed line in `_redirects` or `_headers` stops `astro build` with an error rather than shipping a site whose routing quietly does nothing. That is the point of it, but it does mean adding the integration can break a build that used to pass. Set `failOnRoutingError: false` to downgrade it to a log line while you fix the file. +The integration's `failOnRoutingError` defaults to `true`. A malformed line in `_redirects` or `_headers` stops `astro build` with an error instead of shipping a site whose routing silently doesn't work. This means adding the integration can break a build that used to pass. Set `failOnRoutingError: false` to downgrade it to a log line while you fix the file. The integration needs Astro 6 or newer. Everything else on this page works on any Astro version, because publishing `dist` is a file upload. diff --git a/content/(publish)/recipes/vite.mdx b/content/(publish)/recipes/vite.mdx index 5c3c872..bcc1da6 100644 --- a/content/(publish)/recipes/vite.mdx +++ b/content/(publish)/recipes/vite.mdx @@ -57,6 +57,6 @@ For a single-page app, say so: spacefast({ mode: "spa" }); ``` -That writes an `/index.html` fallback for `/*` into the output, and then checks the fallback file actually exists. A `build.ssr` config is refused outright unless you pass `allowSsrBuild`. +That writes an `/index.html` fallback for `/*` into the output, and then checks that the fallback file exists. A `build.ssr` config is refused outright unless you pass `allowSsrBuild`. The plugin needs Vite 6 or newer. TanStack Start has its own entry point at `@spacefast/vite-plugin/tanstack-start`. More on [Frameworks and builds](/frameworks). diff --git a/content/(publish)/wordpress-data-sources.mdx b/content/(publish)/wordpress-data-sources.mdx index e4e7a51..34b61df 100644 --- a/content/(publish)/wordpress-data-sources.mdx +++ b/content/(publish)/wordpress-data-sources.mdx @@ -3,7 +3,7 @@ title: Build from a WordPress site description: Point a Space's repository build at a public WordPress site, read its content over the REST API during the build, and publish the static output --- -Data sources only reach repository builds — a folder publish, or a local `sf publish` of a built directory, never sees them. +Data sources only reach repository builds. A folder publish, or a local `sf publish` of a built directory, doesn't get them. A data source is a public WordPress site a build reads content from. Nothing is copied into the Space and nothing is written back. The platform hands the build a URL and a source map. Your build code fetches over the WordPress REST API, and the output publishes like any other static build. diff --git a/content/(reference)/config-file.mdx b/content/(reference)/config-file.mdx index 5ee467e..43138c5 100644 --- a/content/(reference)/config-file.mdx +++ b/content/(reference)/config-file.mdx @@ -1,6 +1,6 @@ --- title: Project config reference -description: Every key the project config accepts in spacefast.config.ts or sf.jsonc, how the CLI finds the file, and which defaults the finalizer actually computes +description: Every key the project config accepts in spacefast.config.ts or sf.jsonc, how the CLI finds the file, and which defaults Spacefast computes sidebar: order: 1 --- diff --git a/content/(reference)/glossary.mdx b/content/(reference)/glossary.mdx index 5e9aa0e..7de737c 100644 --- a/content/(reference)/glossary.mdx +++ b/content/(reference)/glossary.mdx @@ -29,11 +29,11 @@ The drag-and-drop publish flow at [drop.fast](https://drop.fast): drag a folder, ## Functions -The runtime for shipping a worker alongside your Space — npm packages, framework server output, outbound HTTP. The other option, alongside [Zero](#zero), for Spaces that need more than static files. See [Functions](/functions). +The runtime that runs a server worker next to your Space, with npm packages, framework server output, and outbound HTTP. It and [Zero](#zero) are the two options for Spaces that need more than static files. See [Functions](/functions). ## Grant -One rule in a Space's access list: it names an audience (public, team, one person, a link, a password, a machine, or an external identity) and what that audience can do. A Space has no public-or-private flag — its access is just the sum of its grants. See [Spacefast Share](/share). +One rule in a Space's access list: it names an audience (public, team, one person, a link, a password, a machine, or an external identity) and what that audience can do. A Space has no public or private switch. Its grants alone decide who can reach it. See [Spacefast Share](/share). ## Live (the live channel) diff --git a/content/(reference)/limits.mdx b/content/(reference)/limits.mdx index cc34f0b..58ad24b 100644 --- a/content/(reference)/limits.mdx +++ b/content/(reference)/limits.mdx @@ -107,4 +107,4 @@ Publishing, building, and creating spaces carry their own hourly budgets that sc Read the rate-limit headers and the error's retry information for the active budget. These safeguards are separate from the plan allowances above. -Full rate limit behavior, including what happens when the accounting backend is down, is on the [Rate limits](/api/rate-limits). For what each error code means and whether it is worth retrying, see [Error codes](/api/errors). +Full rate limit behavior, including what happens when the accounting backend is down, is on the [Rate limits](/api/rate-limits). For what each error code means and whether to retry it, see [Error codes](/api/errors). diff --git a/content/(serve)/caching.mdx b/content/(serve)/caching.mdx index 6370421..472e565 100644 --- a/content/(serve)/caching.mdx +++ b/content/(serve)/caching.mdx @@ -4,7 +4,7 @@ description: Default cache policies for public static files, header overrides, r sidebar: { order: 4 } --- -Republish to request a fresh response from the edge. Public static files use two default cache policies, with exceptions for protected responses, conditional routing, and header overrides. +Public static files use one of two default cache policies. Protected responses, conditional routing, and header overrides change that. To get a fresh response from the edge, republish. ## Two policies @@ -15,7 +15,7 @@ Public static files use these defaults unless a header override or a [no-cache r | Immutable | `public, max-age=31536000, immutable` | | Everything else | `public, s-maxage=600, max-age=0, must-revalidate` | -The second one is worth reading closely. `max-age=0` means the browser revalidates on every load, and the ETag turns that revalidation into a 304 when nothing changed. `s-maxage=600` means shared caches hold a copy for ten minutes. So a visitor sees a new publish immediately once the shared copy is refreshed, and never serves a stale page out of their own browser cache. +In the second policy, `max-age=0` makes the browser revalidate on every load, and the ETag turns that revalidation into a 304 when nothing changed. `s-maxage=600` lets shared caches keep a copy for ten minutes. A visitor's browser never serves a stale page from its own cache. Visitors see a new publish as soon as the shared copy refreshes. **HTML gets the second policy, together with ordinary assets.** There is no separate HTML rule. @@ -23,7 +23,7 @@ The second one is worth reading closely. `max-age=0` means the browser revalidat A file gets the one-year immutable policy when either of these is true. -**Its name carries a content hash.** Detection is deliberately strict, so a rename does not accidentally freeze a file for a year. +**Its name carries a content hash.** Detection is strict, so a file with a version number or date in its name isn't cached for a year by mistake. | Filename | Immutable | Why | | --- | --- | --- | @@ -35,7 +35,7 @@ A file gets the one-year immutable policy when either of these is true. **Or it sits under a known build output directory** and is not `.html`, `.htm`, `.php`, `.txt` or `.xml`. Those directories are `_next/static/`, `_app/immutable/`, `_nuxt/`, `_astro/`, and `_spacefast/platform/`. -A build that emits unhashed filenames gets the ten-minute shared policy on everything. That is correct behavior for it, not a misconfiguration, but hashed filenames are what make repeat visits cheap. +Outside those directories, a file with an unhashed name gets the ten-minute shared policy. That works, but hashed filenames make repeat visits faster. A precompressed sidecar such as `app.js.gz` is served at its own literal URL and is never selected as the answer for `app.js`. @@ -60,33 +60,33 @@ Publish warns with `header_cache_control_platform_managed`, because the header y | Any URL a conditional routing rule touches | `no-store` | | The 405 page | `no-store` | -The non-GET rule is absolute. The shared cache in front of a Space keys on host, path and query without reading the method, so a cacheable answer to a `POST` could be replayed to a `GET`. +The non-GET rule has no exceptions. The shared cache in front of a Space keys on host, path, and query and ignores the method, so a cached answer to a `POST` could be replayed to a `GET`. ## Vary is not part of the cache key The edge keys a stored response on **host, path, and query**. It does not read `Vary`. -That single fact explains a behavior that surprises people. A routing rule with a `Country=`, `Language=`, `Cookie=` or `Agent=` condition would otherwise let one visitor's response reach the next visitor. So any URL a conditional rule touches is forced to `no-store` for everyone, whether the condition matched or not. +Because of this, a routing rule with a `Country=`, `Language=`, `Cookie=`, or `Agent=` condition could send one visitor's response to the next visitor. To prevent that, any URL a conditional rule touches is `no-store` for everyone, whether the condition matched or not. -If a page needs to differ by country, language or client, give each variant its own URL rather than one URL with a condition on it. That keeps the whole set shared-cacheable. +If a page needs to differ by country, language, or client, give each variant its own URL instead of putting a condition on one URL. Then every variant can be cached. ## What a publish does -Activating a new version repoints the Space's hostnames at it and purges the edge for every hostname the Space serves on. Purging is **whole-host**. There is no way to purge one URL, because the cache key includes the query string and an enumerated purge could not name every variant a page lives under. +Activating a new version points the Space's hostnames at it and purges the edge for every hostname the Space serves. Purges clear a **whole hostname**. You can't purge one URL, because the cache key includes the query string and a purge can't list every query a page might be requested with. -Immutable version hostnames are deliberately not purged. Their bytes never change. +Immutable version hostnames aren't purged, because their content never changes. -The purge is a best-effort accelerator, not the correctness mechanism. The ten-minute shared lifetime is the backstop, so the worst case for a page whose purge did not land is that it refreshes within ten minutes. +A purge can fail. If it does, the page still refreshes within ten minutes, when the shared copy expires. -For the browser, a publish changes nothing that needs waiting on. `max-age=0` means every navigation revalidates, so a returning visitor picks up the new version on their next request. Files whose names carry a content hash are the exception, and they do not need invalidating: a new build emits new names. +Browsers don't need a purge. `max-age=0` makes every navigation revalidate, so a returning visitor gets the new version on their first request after the shared copy refreshes. Hashed files and files under the build output directories above are cached for a year. A new build gives changed hashed files new names, but an unhashed file in one of those directories keeps its URL, so browsers can keep the old copy. Rename it when its content changes. ## Getting a fresh response - A publish purges every serving hostname. This is the normal answer. + A publish purges every serving hostname. This is usually all you need. - + Every response carries `X-Spacefast-Runtime: 1`, and `X-Spacefast-Version` names the version that answered. ```bash diff --git a/content/(serve)/customization.mdx b/content/(serve)/customization.mdx index fdd33ac..403ce62 100644 --- a/content/(serve)/customization.mdx +++ b/content/(serve)/customization.mdx @@ -3,21 +3,21 @@ title: Customization description: Theme the pages Spacefast draws, set the title and image links unfurl with, add an analytics tag, and run one site-wide script --- -Everything you set here lives on the Space, not a version — it survives every publish, and it wins over whatever `theme` or `meta` your `sf.jsonc` declares. +Customization settings are saved on the Space, not on a version, and they override the `theme` and `meta` in your `sf.jsonc`. -Open the Space and go to **Customization**. Four tabs, in order: **Theme**, **Search & sharing**, **Google Analytics**, and **Custom JS**. A large live preview sits beside the controls, labelled **Visitor sees**, painted from your unsaved draft. +Open the Space and go to **Customization**. It has four tabs: **Theme**, **Search & sharing**, **Google Analytics**, and **Custom JS**. A preview labeled **Visitor sees** shows your unsaved changes beside the controls. ## What lives on the Space, not the version -Everything on this page is stored on the Space rather than on a version, so it survives a publish and a rollback alike. It also wins over the published `sf.jsonc`: the Space's `theme` replaces the file's rather than merging with it. So a project that sets `theme` in its config, then edits Theme here, keeps seeing the dashboard's answer until you clear it. The same holds for `meta`. +Because these settings are stored on the Space, they stay in place through publishes and rollbacks. They also override the published `sf.jsonc`: the Space's `theme` replaces the file's `theme` instead of merging with it. If your config sets `theme` and you also edit the Theme tab, the dashboard values win until you clear them. The same applies to `meta`. -Theme and share metadata apply without republishing. Save, and the next request gets them. **Custom JS** is the exception, and its own field note says so: a script change takes effect on the next publish. +Theme and share metadata apply without republishing: the next request after you save gets them. **Custom JS** is different. A script change takes effect on the next publish. -Everything the four tabs write is `meta`, `theme`, and `superpowers` in the Space's config. The same keys are documented in the [`sf.jsonc` reference](/config-file), and the [`updateSpace`](/api/reference/spaces/updatespace) operation is what the dashboard calls. +The four tabs write `meta`, `theme`, and `superpowers` in the Space's config. The same keys are documented in the [`sf.jsonc` reference](/config-file), and the [`updateSpace`](/api/reference/spaces/updatespace) operation is what the dashboard calls. ## Theme -Blank means the platform default. The tab's own lead says everything here is optional and suggests starting with an accent. +Every field is optional. A blank field uses the platform default. | Group | Field | Config key | What it does | | --- | --- | --- | --- | @@ -32,19 +32,19 @@ Colors accept hex, `rgb()`, `rgba()`, `hsl()`, `hsla()`, and CSS color names, up ### The background pins the color scheme -Leave **Background** blank and the pages follow each visitor's device, light or dark. The field's default note says exactly that. +With **Background** blank, pages follow each visitor's device setting, light or dark. -Set it, and it stops following. Spacefast reads the color you gave, decides whether it is light or dark, and serves that one scheme to everyone. The field flips to **Pinned.**, with a line saying the color reads as dark or light so every visitor gets that scheme. It also shows **Clear to follow visitors again**. The preview's Auto/Light/Dark switcher is replaced by a locked **Pinned · Dark** or **Pinned · Light** chip, because there is no longer anything to simulate. +Set a background and Spacefast decides whether that color is light or dark, then serves that one scheme to every visitor. The field shows **Pinned.** and a **Clear to follow visitors again** option. In the preview, a locked **Pinned · Dark** or **Pinned · Light** label replaces the Auto/Light/Dark switcher. ### Check the branding entitlement The dashboard enables badge removal when the team has the branding entitlement or the Space used badge removal before the new plans took effect. Other Spaces need the entitlement. -The gate is enforced at publish too. Publishing a version whose effective theme sets `hideSpacefastBranding` without either allowance fails with `hide_spacefast_branding_not_entitled` and the message "theme.hideSpacefastBranding is not included on this plan." +Publishing checks this too. Publishing a version whose effective theme sets `hideSpacefastBranding` without either allowance fails with `hide_spacefast_branding_not_entitled` and the message "theme.hideSpacefastBranding is not included on this plan." ### Code override -A page your version ships as its own file is not repainted by these controls. The preview badges it **Code override.** and says the page ships from that file, with a hint pointing at `_pages/.html`. See [Layout, theme, and site pages](/site-pages). +These controls don't restyle a page that your version ships as its own file. The preview marks that page **Code override.** and points at its `_pages/.html` file. See [Layout, theme, and site pages](/site-pages). ## Search and sharing @@ -57,7 +57,7 @@ What a browser tab, a link unfurl, and a search result show. | **Social image** | `meta.image` | 2000 characters | | **Favicon** | `meta.favicon` | 2000 characters | -The Title help text reads "Browser tabs, link unfurls, and search results." The Social image note says 1200 × 630 fills the card exactly, with placeholder `/og.png`. Favicon takes an upload or a path, placeholder `/favicon.ico`. A value longer than what previews show appends ", cut off in most previews" under the field rather than refusing it. +A 1200 × 630 social image fills the card exactly. Favicon takes an upload or a path. A value longer than most previews can show is still saved, with a note under the field that it will be cut off. **Import from a live page** under **Shortcut** pulls title, description, and image from a page you have already published. Give it a path and press **Fetch**. @@ -72,19 +72,19 @@ The **Google Analytics** tab holds two cards, **Google Analytics** and **Google | Google Analytics | **Measurement ID** | `superpowers.googleAnalytics.measurementId` | `G-` followed by 4 or more letters or digits | | Google Tag Manager | **Container ID** | `superpowers.googleTagManager.containerId` | `GTM-` followed by 4 or more letters or digits | -An id that does not match is refused on save with "Enter a valid GA4 measurement ID." or "Enter a valid web container ID.", and the card's badge reads **Invalid ID**. A card with its switch off reads **Off** and says nothing is sent until you turn it on. With it on and the id valid, the badge reads **Enabled** and the field note becomes "This tool loads on every published page." +Saving an ID that doesn't match fails, and the card shows **Invalid ID**. A card with its switch off shows **Off** and sends nothing. With the switch on and a valid ID, the card shows **Enabled** and the tag loads on every published page. ### Page enhancements has to be on first -Analytics and custom code both ride the Space's injection master switch. With it off, both tabs show the warning **Page enhancements is off.** / "Turn it on before analytics can load on published pages." and every control is disabled, with an **Enable page enhancements** button that flips it in place. +Analytics and custom code only load when the Space's **Page enhancements** switch is on. With it off, both tabs show **Page enhancements is off.**, every control is disabled, and an **Enable page enhancements** button turns it on. -The switch itself lives in **Settings** under **Page enhancements**, described as "Inject performance, SEO, analytics, and comment features into published pages." Turning it off keeps every saved setting ready to restore. When it is on, an **Active now** row lists what is being injected right now. +The switch is in **Settings** under **Page enhancements**. It controls the performance, SEO, analytics, and comment features Spacefast adds to published pages. Turning it off keeps your saved settings. When it's on, an **Active now** row lists what is being added. ## Custom JS One card, **Site-wide JavaScript**, with a **Run custom code** switch and a **JavaScript** textarea. The script applies to every published page view and is stored as the first entry in `superpowers.javascriptTags`. -Do not include `