feat: serve Nebari Classic docs from classic.nebari.dev - #735
Merged
Merged
Conversation
Build the Classic docs as their own site from the same Astro project. `DOCS_SITE=classic` switches astro.config.mjs to `docs/classic/` for content and public assets, outputs to `dist-classic/`, and deploys to a new `nebari-docs-classic` Worker that attaches classic.nebari.dev as a custom domain. - Classic pages are served from the site root; internal links and image paths drop the `/classic` prefix - www.nebari.dev redirects `/classic/*` to classic.nebari.dev with the path preserved, and legacy Docusaurus URLs now point there directly - Cross-site links between the two sites are absolute - The main site drops the Classic sidebar group; the phase-out banner now renders on every Classic page and links to www.nebari.dev - CI builds, tests, previews, and deploys both Workers - Tests cover both sites, stale `/classic/` links, and both `_redirects` files Closes #731, closes #732, closes #733 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Docs preview for
|
khuyentran1401
approved these changes
Sep 25, 2026
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.
Closes #731, closes #732, closes #733
Summary
This builds the Nebari Classic docs as their own site from the same Astro project (option 1 in #731) and serves it from https://classic.nebari.dev.
Two sites, one project
DOCS_SITE=classicswitchesastro.config.mjsto the Classic site: itssrcDirisdocs/classic/, itspublicDirisdocs/classic/public/, it writes todist-classic/, and it has its own sidebar and title. Components and styles insrc/are shared.src/content/docs/classic/toclassic/content/docs/, and its images moved frompublic/img/classic/toclassic/public/img/.starlight-links-validatorhard-codes<srcDir>/content/docs, so leaving the pages in place would have made it resolve every Classic link against the old/classic/...URLs./classic/how-tos/nebari-aws/becomesclassic.nebari.dev/how-tos/nebari-aws/). The site root 302s to/welcome/.dev:classic,build:classic,preview:classic,deploy:classic.Redirects (#733 step 3, handled in the build)
public/_redirectson www.nebari.dev sends/classicand/classic/*tohttps://classic.nebari.dev/:splat(301, path and query kept). Because this runs in the Worker's_redirects, no zone-level redirect rule is needed./docs/faqand similar) now point straight at classic.nebari.dev, so each takes one hop instead of two.Cross-site links
https://www.nebari.dev/classic/...links inside Classic pages (RELEASE notes, troubleshooting, and similar pages) are root-relative now, so the links validator checks them. The examplenebari-config.yamlin advanced-configuration now points athttps://classic.nebari.dev/.Sidebar and banner
routeData.tsnow handles those two sections, and the Classic build doesn't use it.MarkdownContentoverride is only registered for the Classic build, so the phase-out notice renders on every Classic page without theclassic/path check. It links tohttps://www.nebari.dev/docs/introduction/./welcome/.classic.nebari.devis added to the analytics production hosts.Worker and CI (#732, #733 step 2)
wrangler.classic.jsoncdefines thenebari-docs-classicWorker, servingdist-classic/, and declaresclassic.nebari.devas acustom_domainroute. Deploying it creates the DNS record and TLS certificate.docs.ymlbuilds both sites in the test step, uploads a preview version of each Worker on PRs, posts both preview URLs in the sticky comment, and deploys both Workers onmain.Before merging: Cloudflare access (#733 step 1)
CLOUDFLARE_API_TOKENneeds to be able to create and deploy a second Worker (nebari-docs-classic). If its scope only coversnebari-docs, this PR's preview job will fail at the Classic upload step.nebari.dev. If we'd rather not grant those, droproutesfromwrangler.classic.jsoncand have someone add the domain in the dashboard.wrangler deploy. Because of thecustom_domainroute, that first run from this PR also bringsclassic.nebari.devlive, with the same content it will have after merge.Test plan
bun test testbuilds both sites. It covers: every page renders with its title, every internal href and image resolves on both sites, the search UI mounts, the main site contains no Classic pages, Classic pages sit at the root with the phase-out notice, no page links to/classic/on www.nebari.dev, and both_redirectsfiles point at built pages (15 pass)wrangler devlocally:/classic,/classic/how-tos/nebari-aws/, and/classic/...?x=1on the main Worker return 301 to the matching path on classic.nebari.dev, and/docs/faqgoes straight toclassic.nebari.dev/faq/. On the Classic Worker,/returns 302 to/welcome/, pages and images return 200, and unknown paths return 404https://classic.nebari.devserves over valid TLS, andhttps://www.nebari.dev/classic/<path>returns 301🤖 Generated with Claude Code