Skip to content

Migrate site from Next.js to Astro - #500

Draft
just-be-dev wants to merge 12 commits into
mainfrom
astro
Draft

just-be-dev wants to merge 12 commits into
mainfrom
astro

Conversation

@just-be-dev

@just-be-dev just-be-dev commented Aug 29, 2026 •

Copy link
Copy Markdown
Contributor

Taking a pass at switching over to astro from next. Just experimenting with some stuff.

Summary

  • migrate the site and API routes from Next.js to Astro
  • preserve existing React page components and site behavior
  • fix dark-mode hydration parity and prevent MDX comments from leaking into episode pages
  • update build, deployment, RSS, and content-generation configuration

Verification

  • compared the live and Astro sites across primary routes at desktop and mobile widths
  • exercised episode tabs and light/dark preference changes
  • confirmed matching visible content and layout, aside from intentional Astro labels
  • pnpm build

@vercel

vercel Bot commented Aug 29, 2026 •

Copy link
Copy Markdown
Contributor

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

Project Deployment Actions Updated
devtools-fm Ready Ready Preview Oct 29, 2026 12:34pm UTC

Request Review

- Color Andrew's speaker labels blue and other speakers purple via a rehype
  step, matching the old next-mdx-remote strong component; use theme vars
  for links instead of fixed hex colors
- Drop the bullet/indent list styles that Next's preflight never had
- Make episode tabs direct TabList children so devtools-ds applies the
  selected style (and React stops warning about Fragment index props)
- Sync the active tab with ?view= on back/forward navigation
- Stop shipping the raw transcript in episode island props, and the full
  tab sections on the home and subscribe pages
- Guard the git-date fallback so a missing git history can't fail the build
- Use www.devtools.fm as the site URL; the apex domain 308-redirects
- Redirect the old Next.js opengraph-image URLs to the new .png routes
- Add og:image dimensions, initial-scale viewport, and skip empty
  descriptions
- Add a prerendered 404 page so unknown URLs don't hit the function
- Time out YouTube thumbnail fetches during OG generation
- Generate rss.xml before astro build in the mise build task
- Update main's episode-mdx script to the new processMdx signature
- Add @astrojs/check with a check script, and fix the type errors it found
- Pin Node 24.x to match mise and the Vercel function runtime
- Drop the webpack-specific note from the Buffer runbook; fix README path
Every page used to hydrate as one whole-page React island (react-dom plus
about 240KB of JS) only to drive the nav tabs and the episode tab switcher.
Pages now render their React components at build time with no client:*
directive.

- Site nav: real <a href> links styled with devtools-ds Navigation classes,
  replacing reach-tabs buttons that navigated on mousedown (Enter, cmd-click
  and middle-click now work)
- Episode tabs: static devtools-style markup with unique ids and hidden
  panels, plus a ~1KB inline script for ?view=, back/forward and arrow keys.
  The YouTube embed is lazy so the hidden panel doesn't load the player
- Host ObjectInspectors are the only island (client:visible on the home
  page): the inspector builds its tree in an effect and is expandable
- Dark mode stays CSS-only: components render light firefox classes and
  globals.css overrides the devtools-ds variables
- Replace react-window-ui (styled-components, styles only exist after
  hydration) with a plain-CSS browser frame
- Fix two Astro-migration regressions: the inspector's tree CSS (expand
  arrows) was tree-shaken out, and panel text took ObjectInspector's gray
  --textColor on every page instead of only on the home page
- Remove unused dependencies: react-window-ui, @reach/tabs,
  @radix-ui/react-label, cheerio, isomorphic-fetch
Found by full-page screenshot diffs of every route against www.devtools.fm
(desktop 1280 + mobile 390, light + dark):

- Restore the @reach/tabs look the Next.js tabs had: the tinted tab strip
  and the currentColor underline on the selected tab
- Episode tabs: mark the selected tab only with that underline, as
  production does (devtools-ds' blue selected style never applied there)
- Episode content headings: use the line-heights of the Tailwind classes
  the old MDX components used (text-2xl/xl/lg); the missing line-height
  made h2s ~4px taller and each transcript section heading ~1px shorter

This branch was successfully deployed

1 active deployment
Preview — b084e2c6 Deployed Oct 29, 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