Blog · · 1 min read
Rebuilding my site with Astro 7 and Cloudflare
Replacing an old Express + EJS portfolio with a static Astro monorepo, and a dithered mountain to replace the old hero photo.
My old portfolio was an Express server rendering EJS templates: a mountain photo, a resume, and a contact form behind reCAPTCHA. It needed a server to do a static site's job, and I'd stopped updating it.
The setup
- Turborepo monorepo.
apps/webis the site, andpackages/brandholds the design system. Anything new gets its own app folder. - Astro 7 on Cloudflare Workers. Pages are prerendered static HTML. The blog, a small admin studio, first-party analytics and the contact form run in one Worker, with posts in D1.
- One deploy.
wrangler deployships the static assets and the Worker together.
The design
The name and headings are set in Geist Pixel, on the same pixel grid as the art; body text is Archivo, with monospace for dates and small print.
The mountain from the old site is still here, redrawn with ordered dithering, the same technique ZWB.SH uses for all its graphics. The sky, the sun, three ranges and the snow on the main peak are one colour field, stepped through five colours with an 8×8 Bayer matrix. On a phone it crops around the summit instead of squashing.
The footer has a theme switch if you want the greyscale ZWB.SH version, or the punk one.
SEO
One shared component handles canonical URLs, Open Graph and Twitter cards, and JSON-LD (Person, BlogPosting, breadcrumbs). The site has a sitemap and robots.txt, and the blog has an RSS feed.