Skip to content

fix(landing): serve the docs at openscience.sh/docs#89

Merged
Aayam Bansal (aayambansal) merged 1 commit into
mainfrom
fix/serve-docs-at-openscience-sh
Jul 5, 2026
Merged

fix(landing): serve the docs at openscience.sh/docs#89
Aayam Bansal (aayambansal) merged 1 commit into
mainfrom
fix/serve-docs-at-openscience-sh

Conversation

@aayambansal

Copy link
Copy Markdown
Member

openscience.sh/docs was showing the landing page because the landing's Vercel deploy rewrites every path to its own index.html, so /docs never reached the docs site — the docs build wasn't served anywhere.

Fix, entirely within the existing single openscience.sh deploy (no Vercel dashboard changes):

  • The docs are a hash-routed static Vite build, so they can be served as plain static files. Embedded the built docs in frontend/landing/public/docs/ — Vite copies public/ verbatim into the deploy output, so they ship to openscience.sh at /docs.
  • Updated frontend/landing/vercel.json to route /docs and /docs/* to the docs shell (/docs/index.html) ahead of the landing catch-all. Physical assets (/docs/assets, /docs/fonts, /docs/favicon.svg) are served by the filesystem first, so client-side hash navigation and asset loading both work.
  • Added bun run --cwd frontend/landing sync:docs to rebuild frontend/docs and refresh the embedded copy after any docs edit; the built copy is prettier-ignored.

Verified locally: the landing build now emits dist/docs/index.html (title "OpenScience Docs"), and a static server returns 200 for /docs/, /docs/index.html, the JS/CSS assets, and the favicon, while / still serves the landing.

After merge, the next openscience.sh deploy serves the docs at /docs. frontend/docs remains the editable source (typechecked and built in CI).

The landing's catch-all rewrite sent every path to its own index.html,
so /docs rendered the landing page. The docs are a hash-routed static
build, so embed them in the landing's public/docs (Vite copies public/
verbatim into the deploy) and route /docs to the docs shell ahead of
the catch-all. Rebuild with `bun run --cwd frontend/landing sync:docs`
after editing frontend/docs.
@vercel

vercel Bot commented Jul 5, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
openscience Ready Ready Preview, Comment Jul 5, 2026 12:57pm

Request Review

@aayambansal Aayam Bansal (aayambansal) merged commit 424463c into main Jul 5, 2026
12 checks passed
@aayambansal Aayam Bansal (aayambansal) deleted the fix/serve-docs-at-openscience-sh branch July 5, 2026 13:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant