Repository navigation
feat(docs): give every docs page its own URL and prerendered HTML - #976
Merged
Merged
Conversation
Docs pages move from /docs/#/openscience/<page> to /docs/<page>. Each page is rendered at build time with its own title, description, canonical URL and TechArticle + BreadcrumbList JSON-LD, so search engines can index and rank pages individually instead of seeing one /docs shell. - old hash links and renamed pages redirect in the browser (movedHref) - navigation stays in place: internal links use the History API - unknown /docs paths serve a noindex not-found page; /docs/sitemap.xml lists all pages - the stored theme is applied by an inline script before the prerendered page paints - llms.txt and llms-full.txt use the new URLs - builds fail on a page with a title over 60 characters, a description over 155, or not exactly one h1 Landing: titles within 60 characters (home, benchmark), benchmark description within 155, page-level WebPage/BreadcrumbList JSON-LD, the same build check, docs() links to /docs/<page>, robots.txt lists the docs sitemap. Co-authored-by: Cursor <cursoragent@cursor.com>
Ishaan Gangwani (ishaan1124)
requested a review
from Aayam Bansal (aayambansal)
as a code owner
October 13, 2026 02:52
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
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.
Why
The docs used hash routing (
/docs/#/openscience/<page>). Search engines ignore the fragment, so all ~70 pages counted as one URL whose HTML was an empty shell. Docs are a major ranking surface for developer tools; this makes each page indexable on its own.What
Docs
/docs/<page>(navigation.ts:parseRoutereads paths and still parses legacy hash routes;pageHrefemits paths)script/prerender.tsrenders every page indocs.jsontodist/<page>.htmlwith its own<title>(documentTitle, ≤60 chars), description, canonical, OG/Twitter tags andTechArticle+BreadcrumbListJSON-LD; writes a noindex404.htmlandsitemap.xmlmain.tsxredirects old links (/docs/#/openscience/x,/docs/#<renamed>,/docs/<renamed>) viamovedHrefbefore hydrating; the CLI, apps and READMEs keep workingpopstate)useThemestarts light for hydration and syncs in a layout effectexport.ts: llms files use the new URLsLanding
WebPage/BreadcrumbListJSON-LD; same build checkdocs()links to/docs/<page>;vercel.jsonrewrites unknown docs paths to the docs 404 and 308s/docs/to/docs;robots.txtlists/docs/sitemap.xmlVerified locally
bun run test:docsequivalents:bun test ./test(8 pass, routes + legacy redirects + titles),tsc --noEmite2e/docs.spec.ts(updated for path URLs, still covers legacy hash links): 6/6 pass, including all 70 pages rendering with the right h1/title and no page errors404.htmlhydrates cleanlydist/docsMade with Cursor