feat: upgrade to Astro 6 with self-hosted Fonts API - #6
Merged
Conversation
Upgrades from Astro 5.18 to Astro 6.1.7. Key changes: - All 4 sites now use the Astro 6 Fonts API (configured in astro.config.mjs) instead of third-party Google Fonts CSS @import. Fonts are downloaded at build time, self-hosted, and served with optimized fallbacks — no runtime requests to fonts.googleapis.com, better privacy and performance. - Removed all @import url('https://fonts.googleapis.com/...') from global.css - Updated scaffolder (new-site.sh) to generate Fonts API config per preset instead of writing @import lines - Bumped "astro": "^5" → "^6" in all site package.json files - Updated README (Astro 5 → Astro 6) and CLAUDE.md with Fonts API note Font configuration per preset: - Corporate: Inter (heading + body) - SaaS: Sora (heading) + Inter (body) - Warm: Playfair Display (heading) + Source Sans 3 (body) No breaking changes to component code — all components use CSS custom properties (--font-heading, --font-body) which the Fonts API populates automatically.
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
Upgrades the entire monorepo from Astro 5.18 to Astro 6.1.7 and adopts the new Fonts API for self-hosted, optimized web fonts.
What changed
Astro 6 upgrade
"astro": "^5"→"^6"in all 4 sitepackage.jsonfilesFonts API adoption (the big improvement)
Before: Each site loaded fonts via
@import url('https://fonts.googleapis.com/...')inglobal.css. This meant:After: Fonts are configured in
astro.config.mjsvia the Astro 6 Fonts API:This means:
Scaffolder updated
scripts/new-site.shnow generates the Fonts API config inastro.config.mjsper preset instead of writing@importlines in CSS.Font config per preset
Test plan
bun installclean (Astro 6.1.7 installed)bun run build— all 4 sites build successfullyRisk
Low. Astro 6 is a clean upgrade for this codebase — we weren't using any of the removed/changed APIs. The font change is the only user-visible difference and it should look identical (same fonts, same weights) while being faster.