From a7895cce323123c486831027bc391e07ce0d2033 Mon Sep 17 00:00:00 2001 From: gorkem-bwl Date: Fri, 22 May 2026 14:26:51 -0400 Subject: [PATCH] fix(docs): serve docs site at root of Vercel domain MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Astro's base option was set to /docs to anticipate the reverse-proxy URL at checkmate.so/docs. Vercel serves the dist folder at the root, which made every page 404 because Astro had baked /docs/ into every internal link and asset URL. ## Changes - Remove base: "/docs" from astro.config.mjs — site now serves at root - Update Releases nav link to /releases - Update README's reverse-proxy snippet to strip the /docs prefix before forwarding to Vercel ## Final URL behaviour - Direct: https:/// → Introduction - Direct: https:///releases/ → Releases - Proxy: https://checkmate.so/docs/ → strip /docs → Introduction - Proxy: https://checkmate.so/docs/releases/ → strip /docs → Releases --- docs/api/astro.config.mjs | 7 ++++--- docs/api/src/components/HeaderLinks.astro | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/docs/api/astro.config.mjs b/docs/api/astro.config.mjs index f978dc1c9..0018caf05 100644 --- a/docs/api/astro.config.mjs +++ b/docs/api/astro.config.mjs @@ -10,9 +10,10 @@ import starlightOpenAPI, { openAPISidebarGroups } from "starlight-openapi"; const OPENAPI_PATH = "./src/vendored/openapi.json"; export default defineConfig({ - // Served at https://checkmate.so/docs — the leading slash is included so - // every internal link resolves correctly when fronted by a reverse proxy. - base: "/docs", + // The deployed site serves at the root of its Vercel domain. The + // reverse proxy that maps checkmate.so/docs/* → Vercel must strip + // the /docs/ prefix before forwarding (the Cloudflare Worker snippet + // in docs/api-content/README.md does this). site: "https://checkmate.so", integrations: [ diff --git a/docs/api/src/components/HeaderLinks.astro b/docs/api/src/components/HeaderLinks.astro index 4f681b283..c385d1fa0 100644 --- a/docs/api/src/components/HeaderLinks.astro +++ b/docs/api/src/components/HeaderLinks.astro @@ -4,7 +4,7 @@ import Default from "@astrojs/starlight/components/SocialIcons.astro"; --- -Releases +Releases