chore: migrate to Astro 7#40
Merged
Merged
Conversation
- astro 5.16.16 -> 7.0.6, @astrojs/react -> 6.0.1, @astrojs/sitemap -> 3.7.3 - keep the remark/rehype markdown pipeline (admonitions) via @astrojs/markdown-remark unified() processor instead of the new Sätteri default - hoist experimental.fonts to the stable top-level fonts config - pin compressHTML: true to preserve whitespace between inline elements - Zod 4: z.string().url() -> z.url(), import z from astro/zod - bump astro-expressive-code + plugin-collapsible-sections to 0.44, tailwindcss/@tailwindcss/vite to 4.3.2 (Vite 8 peer support) - @lucide/astro 0.522 -> 1.23: brand icons removed upstream, Footer now uses the local github.astro component (and its title is fixed) - drop tsconfig baseUrl (crashes Astro 7 alias resolver on data: URIs from swiper CSS; paths resolve relative to tsconfig without it) - add mdast-util-to-hast devDep for the hName/hProperties mdast Data augmentation used by the admonitions plugin - add engines.node >=22.12.0 (Astro 7 requirement)
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.
Summary
Migrates the site from Astro 5.16.16 to Astro 7.0.6 (crosses two majors, 5 → 6 → 7), following the official upgrade guides for v6 and v7.
Dependency bumps
astro5.16.16 → 7.0.6,@astrojs/react→ 6.0.1,@astrojs/sitemap→ 3.7.3astro-expressive-code+@expressive-code/plugin-collapsible-sections→ 0.44.0 (Astro 7 peer support)@lucide/astro0.522 → 1.23 (Astro 7 peer support)tailwindcss+@tailwindcss/vite→ 4.3.2 (Vite 8 peer support),@tailwindcss/typography→ 0.5.20@astrojs/markdown-remark(see below),mdast-util-to-hast(devDep, type augmentation for the admonitions plugin)Code/config changes for breaking changes
processor: unified({ remarkPlugins: [...] })from@astrojs/markdown-remark. (Porting admonitions to Sätteri could be a future follow-up.)experimental.fontsgraduated → top-levelfonts(same shape).compressHTML: truepinned: the new'jsx'default strips whitespace between inline elements, which our templates rely on (e.g. icon + label in BlogLayout).z.string().url()→z.url();zimported fromastro/zod.baseUrl— with it set, Astro 7's tsconfig-alias plugin stats every bare specifier and crashes (ENAMETOOLONG) on the base64data:font URI inside swiper's CSS.pathsresolve relative to the tsconfig without it, so@components/@lib/@imagesaliases are unaffected.ui/social/github.astro(whose<title>wrongly said "LinkedIn", fixed).engines.node >= 22.12.0added (Astro 7 requirement; CI already runs Node 24).Sanity testing (v5 baseline build vs v7 build)
<title>s, and all h2/h3 heading IDs (no anchor/SEO churn)href="#x"resolves on both buildsrss.xmlbyte-identical modulolastBuildDate(12 items), sitemaps valid XML with same 14 URLs, JSON-LD blocks byte-identicalfetchpriority="auto"no longer emitted (browser default) and 12 markdown images gaining an inert emptysrcset=""(Astro 7's no-upscale rule; browsers fall back tosrc)/,/blog/,/blog/nodejs-http-request/,/404: fonts, hero image, hydrated counters, admonitions, code blocks, TOC, avatars all render correctly (404's WebGL area is blank in headless capture on the v5 baseline too, i.e. not a regression)pnpm build,typecheck,lint,format:checkall greenRemaining known cosmetic diffs: lucide 1.x icon SVG markup, expressive-code copy button gained an
aria-liveregion (a11y improvement).🤖 Generated with Claude Code