From 9fcdfba59461f46c030e483bc3e5ca3b6ac1242b Mon Sep 17 00:00:00 2001 From: kn0ax Date: Sun, 22 Nov 2026 18:12:32 +0000 Subject: [PATCH 01/10] Rewrite AI-sounding prose on entry and Serve pages Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- content/(reference)/glossary.mdx | 4 +-- content/(serve)/caching.mdx | 26 ++++++++-------- content/(serve)/customization.mdx | 36 +++++++++++----------- content/(serve)/domains.mdx | 32 ++++++++++---------- content/(serve)/routing.mdx | 6 ++-- content/(serve)/share.mdx | 40 ++++++++++++------------- content/(serve)/stats.mdx | 14 ++++----- content/(serve)/urls.mdx | 24 +++++++-------- content/index.mdx | 4 +-- content/troubleshooting.mdx | 50 +++++++++++++++---------------- 10 files changed, 118 insertions(+), 118 deletions(-) diff --git a/content/(reference)/glossary.mdx b/content/(reference)/glossary.mdx index 5e9aa0e0..7de737c0 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/(serve)/caching.mdx b/content/(serve)/caching.mdx index 63704215..552dda25 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. +A build that emits unhashed filenames gets the ten-minute shared policy on every file. 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 next request. Files with a content hash in their name are cached for a year, but a new build gives changed files new names. ## 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 fdd33ac3..403ce623 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 `