Skip to content

Upgrade Astro v5 → v7#34

Merged
HumbleBee14 merged 2 commits into
mainfrom
chore/astro-v7-upgrade
Jul 18, 2026
Merged

Upgrade Astro v5 → v7#34
HumbleBee14 merged 2 commits into
mainfrom
chore/astro-v7-upgrade

Conversation

@HumbleBee14

Copy link
Copy Markdown
Member

Upgrades the project two majors: Astro 5.18 → 7.1.1. Done while the site has zero posts — the cheapest possible migration window.

Changes

  • v6 content collections: moved `src/content/config.ts` → `src/content.config.ts` and fixed the topic-scan `readdirSync` path (relative base changed with the file location). All collections already used the modern glob loader, so no loader rewrites needed.
  • Zod v4: import `z` directly from `zod` (the `astro:content` re-export is deprecated); migrated `z.string().url()`/`.email()` → top-level `z.url()`/`z.email()`. Cleared 64 deprecation hints.
  • v7 MDX plugin API: moved `remarkPlugins`/`rehypePlugins` off `mdx({...})` (deprecated, removed in v8) onto a shared `markdown.processor` via `unified()`. MDX inherits them.
  • Deps: astro 7.1.1, @astrojs/mdx 7, @astrojs/react 6, sitemap/rss/check bumped; added `zod` as a direct dependency.

Verification

  • `npm run verify`: 0 errors, 0 warnings, 2 hints (both pre-existing, unrelated)
  • `npm run build`: succeeds, Pagefind indexes
  • 69/69 tests pass
  • KaTeX math + autolink heading anchors verified rendering after the processor move
  • Dev server: /, /blog, /write (React island), /forum all return 200

External deps unaffected by the version jump: Pagefind, giscus, forum GraphQL, Cloudflare Pages Functions, write portal (BlockNote).

🤖 Generated with Claude Code

- Move content config to src/content.config.ts (v6 collections change)
- Import zod directly; migrate to top-level z.url()/z.email()
- Move remark/rehype plugins to shared markdown.processor (v7 MDX API)
- Bump @astrojs/mdx, react, sitemap, rss, check
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 18, 2026

Copy link
Copy Markdown

Deploying mlsystems with  Cloudflare Pages  Cloudflare Pages

Latest commit: 5a33303
Status:⚡️  Build in progress...

View logs

@github-actions

Copy link
Copy Markdown

@HumbleBee14
HumbleBee14 merged commit 34f73de into main Jul 18, 2026
0 of 2 checks passed
@HumbleBee14
HumbleBee14 deleted the chore/astro-v7-upgrade branch July 18, 2026 10:10
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