Skip to content

Migrate website to Astro and update Suites 4 documentation - #30

Merged
omermorad merged 15 commits into
masterfrom
astro-current-website
Nov 5, 2026
Merged

omermorad merged 15 commits into
masterfrom
astro-current-website

Conversation

@omermorad

@omermorad omermorad commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

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.

  • Provide a redesigned homepage, consistent light and dark themes, documentation search, responsive navigation, and accessible SVG diagrams.
  • Organize framework alternatives under Quick Start, keep learning paths coherent, and add complete examples for NestJS, InversifyJS, and InjectionJS with Jest or Vitest.
  • Validate rendered metadata, sitemap coverage, internal links, emitted assets, and legacy fragments after every build. Restore GitHub CI and Node 22.
  • Run analytics only in production. Sync Algolia configuration and request a recrawl after publication; skip crawler mutations in previews and local Netlify builds.

Validation:

  • Production and deploy-preview builds pass for all 27 pages.
  • Rendered output audit: 303 asset references, 1,920 internal links, 69 restored fragments, zero errors.
  • All 211 old documentation heading anchors resolve; all 20 old documentation routes are preserved directly or through a redirect.
  • pnpm check: zero errors.
  • pnpm test: eight tests pass, covering crawler lifecycle guards and renderer dependency resolution.
  • Shared documentation examples pass 21 runtime tests across all three frameworks and TypeScript checks.
  • Diagram previews visually checked in both themes.

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 6aecdb904dbe02fb505f1d30 is 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.

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.
@vercel

vercel Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
docs.suites.dev Ready Ready Preview Nov 5, 2026 7:38pm UTC

@netlify

netlify Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for suites-dev ready!

Name Link
🔨 Latest commit d14373e
🔍 Latest deploy log https://app.netlify.com/projects/suites-dev/deploys/6aecdb01618678380a84b06a
😎 Deploy Preview https://deploy-preview-30--suites-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@omermorad
omermorad merged commit 10fbe4f into master Nov 5, 2026
8 checks passed
@omermorad
omermorad deleted the astro-current-website branch November 5, 2026 19:43

This branch was successfully deployed

1 active deployment
Preview — d14373e7 Deployed Nov 5, 2026 by vercel[bot]
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