fix(landing): serve the docs at openscience.sh/docs#89
Merged
Conversation
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.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
openscience.sh/docs was showing the landing page because the landing's Vercel deploy rewrites every path to its own
index.html, so/docsnever reached the docs site — the docs build wasn't served anywhere.Fix, entirely within the existing single openscience.sh deploy (no Vercel dashboard changes):
frontend/landing/public/docs/— Vite copiespublic/verbatim into the deploy output, so they ship to openscience.sh at/docs.frontend/landing/vercel.jsonto route/docsand/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.bun run --cwd frontend/landing sync:docsto rebuildfrontend/docsand 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/docsremains the editable source (typechecked and built in CI).