fix(docs): serve docs site at root of Vercel domain
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://<vercel-domain>/ → Introduction - Direct: https://<vercel-domain>/releases/ → Releases - Proxy: https://checkmate.so/docs/ → strip /docs → Introduction - Proxy: https://checkmate.so/docs/releases/ → strip /docs → Releases
This commit is contained in:
1 parent
8e4e9dd87c
commit
a7895cce32
2 files changed
+5
-4
No files matched your search
@@ -10,9 +10,10 @@ import starlightOpenAPI, { openAPISidebarGroups } from "starlight-openapi";
|
|||||||
const OPENAPI_PATH = "./src/vendored/openapi.json";
|
const OPENAPI_PATH = "./src/vendored/openapi.json";
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
// Served at https://checkmate.so/docs — the leading slash is included so
|
// The deployed site serves at the root of its Vercel domain. The
|
||||||
// every internal link resolves correctly when fronted by a reverse proxy.
|
// reverse proxy that maps checkmate.so/docs/* → Vercel must strip
|
||||||
base: "/docs",
|
// the /docs/ prefix before forwarding (the Cloudflare Worker snippet
|
||||||
|
// in docs/api-content/README.md does this).
|
||||||
site: "https://checkmate.so",
|
site: "https://checkmate.so",
|
||||||
|
|
||||||
integrations: [
|
integrations: [
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
import Default from "@astrojs/starlight/components/SocialIcons.astro";
|
import Default from "@astrojs/starlight/components/SocialIcons.astro";
|
||||||
---
|
---
|
||||||
|
|
||||||
<a class="header-link" href="/docs/releases">Releases</a>
|
<a class="header-link" href="/releases">Releases</a>
|
||||||
<Default><slot /></Default>
|
<Default><slot /></Default>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
|||||||
Reference in new issue
Block a user