How Cloudflare built their showcase site for Workers on Sanity.io and Gatsby… and Workers (ssr)
Written by Knut Melvær
Missing Image!
Workers is Cloudflare’s “functions on the CDN” service, which gives you the ability to run JavaScript/Rust/WASM on the edge. Having effectively V8 (Chrome’s JS engine) on the edge, with almost no boot-up time is pretty amazing, also as a technical achievement. So we were delighted to learn that the Cloudflare Workers showcase site was built using Sanity.io as its content backend. It also made us curious about how their experience building it had been, and how it was put together.
We asked their developer advocate, Kristian Freeman to take us through how the site was built. He joined us for almost an hour touching on stuff like:
- What Cloudflare Workers is, and what you can use it for
- Why they chose to build with JAMstack and Gatsby
- How Sanity’s source plugin for Gatsby works
- How to deploy a site to Workers using GitHub Actions
- Why you want to design with content first (no lorem ipsum)
- Some of the cool features with Workers Key-Value Store
- How to build layout abstractions alongside structured content
- Kristian is also running Byteconf, a free online conference series that you should check out.
We hope you’ll enjoy the conversation as much as we did!