Repository navigation
Migrate website to Astro and update Suites 4 documentation - #30
Merged
Merged
Conversation
Replaces the Docusaurus site with the Astro rebuild and its new design. The published surface is unchanged: the same Suites Unit pages, at the same URLs. Suites Blackbox is not part of this. It is alpha, it ships on its own branch, and it lands on top of this one when it is ready, so a reader sees no half-finished second product in the meantime. Astro 5 with pnpm, MDX content collections, expressive-code, and the Tabs, TabItem and Aside components replacing the Docusaurus theme equivalents.
The live site runs on Netlify behind Cloudflare. Moving hosts and rebuilding the site at the same time would land two risky changes in one cutover, so this branch targets the project that already serves suites.dev. - Drops @astrojs/vercel and vercel.json; static output needs no adapter. - Ports netlify.toml from master unchanged except for the build command and publish directory, so the redirect set stays exactly what the edge serves today. /sitemap.xml now rewrites to the sitemap index, since robots.txt and Search Console already point at the old path. - Ports the _headers cache rules from master, retargeted from Docusaurus /assets/* to Astro /_astro/*. Those rules took the Cloudflare cache hit rate from 0.028% to a hit on every repeat request. - Moves the redirect set out of astro.config.mjs. Under static output Astro writes a real index.html for each redirect, and Netlify skips a non-forced redirect when a file exists at that path, so the two together serve a 200 with a meta refresh instead of a 301. - trailingSlash: "always", with canonical tags to match. Both the layout default and the docs route built the no-slash form, which Netlify then redirects away from.
These pages were forked from the Docusaurus docs before #27, so both defects it fixed are still present here. Five See Also links pointed at headings that do not exist and dropped the reader at the top of the target page: types#mocked, unitreference, installation#typescript-configuration, testbed-solitary's pre-compile-mock-configuration, and fundamentals#solitary-tests. The rest slash-terminates every internal /docs link across content, nav config and components, so none of them takes a redirect now that the site is slash-canonical. Verified against the built output: every anchor target resolves and all 21 distinct internal targets are real routes.
The pages on this branch were forked before #26 and #29. - installation: rebuilt from master, which nests the package-manager tabs inside Jest / Vitest / Sinon tabs instead of assuming Jest, renames "For Vitest Users" to "Vitest: decorator metadata setup", and adds the Automock migration tip. Docusaurus directives converted to the Aside component. - from-automock: Automock support ended on June 30 2026, so the notice and the three passages that described it as upcoming now describe it in the past. - why-suites: adds the paragraph stating that the TestBed API is the same across Jest, Vitest and Sinon. Headings now match master on every shared page, apart from the H1 that these pages take from frontmatter rather than from the body.
- src/pages/sandbox/design-system.astro was a component catalogue built during the redesign. It was publicly reachable and listed in the sitemap. - astro.config.mjs pinned a one-off ngrok hostname in the dev server's allowedHosts. - netlify.toml redirected /docs to /docs/get-started/. This site builds a real /docs landing page, and Netlify skips a non-forced redirect when a file exists at that path, so the rule could never fire. The sitemap now matches the live one exactly, plus /docs.
Blackbox was the only nav item that carried one, so the property no longer exists on the link type and astro check failed on it.
Same elements the site publishes today, drawn with the Astro design system instead of the Docusaurus stylesheet: hero with the four calls to action, the adapter row with the Official badges, the With Suites / Without Suites comparison, four capability cards, and four alternating sections pairing copy with a code sample. Typography, spacing, borders and the pink accent all come from tokens.css, so the page matches the docs rather than sitting beside them in an older visual language. The Used by logo wall is gone, along with the "Share your experience" line that sat inside it. Click tracking carries over through the analytics util, wired from a listener on data-track rather than inline handlers.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
✅ Deploy Preview for suites-dev ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
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.
Replace the Docusaurus website with Astro and update the Unit documentation for Suites 4. The site adds framework-specific quickstarts, explains native IoC containers versus Suites, and preserves every old documentation route and heading fragment.
Validation:
pnpm check: zero errors.pnpm test: eight tests pass, covering crawler lifecycle guards and renderer dependency resolution.Hosted Netlify preview checks pass for 26 routes, 17 assets, 44 redirects, and the custom 404. Mobile navigation, live search results, search focus restoration, and light/dark rendering were checked in Chrome. Production deploy
6aecdb904dbe02fb505f1d30is published at https://suites.dev. Live checks pass for all 26 routes, 17 assets, 44 redirects, the custom 404, canonical metadata, indexability, and analytics. The post-publication crawler config sync and reindex succeeded; public search now returns the NestJS, InversifyJS, and InjectionJS framework guides.