We just wrapped up a performance pass on the site, and the results speak for themselves.
What changed
- Static-first architecture — mcky.space is built with Astro (static output) and vanilla JS for the small bits of interactivity. No React, no Next.js. Static pages ship zero client JS; only the theme toggle and copy-code buttons use vanilla JS.
- Self-hosted fonts — JetBrains Mono is served as a self-hosted WOFF2 variable font with
font-display: swap. No Google Fonts request, no layout shift. - Immutable caching — fonts and
_astroassets getCache-Control: public, max-age=31536000, immutablevia Cloudflare Pages_headers. - Security + cache headers — X-Content-Type-Options and X-Frame-Options are set on every route; no third-party scripts are loaded.
- Rendering — blog markdown is rendered with
marked+ highlight.js on the server; trusted content only, no sanitization layer needed. - Prebuilt blog index — posts are compiled from markdown to TypeScript at build time, so there is no runtime filesystem or database access.
Why
The site started life as a heavier SPA-style app. Stripping it back to Astro removed an entire client framework from the critical path. Pages that are just content (home, about, projects) are pure HTML now.
Key wins
- TypeScript compiles clean — zero errors, zero warnings
- No runtime database on the main site — it is fully static
- Long-lived cache headers on hashed assets
- No third-party scripts — all interactivity is vanilla JS inline
The site feels lighter. Not that it was heavy before, but now it moves the way a terminal-inspired site should — fast, clean, no flashing.