Deploying a Next.js site on Cloudflare Pages with webhooks
Written by Lo Etheridge, Martin Jacobsen
Join Lauren and Martin from the Sanity.io developer relations team as they explore the brand new platform for JAMStack hosting – Cloudflare Pages!
Taking the scenic route through the JAMStack landscape, we'll start by creating a new project in Sanity.io and customizing the built-in blog studio template to reflect our content.
Next up (no pun intended) we check out the freshly dropped Next.js 12, and how to build a frontend for our project using the next-sanity toolkit – stopping to muse about key concepts such as how to pre-render content with getStaticProps
and getStaticPaths.
Finally, we circle back to Cloudflare Pages and look at how to set up its build hook feature to deploy our project automatically whenever our code and/or content change, rendering lightning-fast static HTML pages!