Company
Date Published
Author
Phil Hawksworth
Word count
543
Language
English
Hacker News points
None

Summary

Netlify is highlighting a different feature each day in December, with one of them being the On-demand builders. These are serverless functions that can be used to defer the generation and persistence of pages until they are requested, which can help keep site build times manageable even for extensive sites. The main pieces to consider when building a site using on-demand builders are deciding which URLs will resolve to these functions and creating an on-demand builder function, which can be written in JavaScript or TypeScript. Netlify provides a library function that tells the Edge infrastructure how to serve and cache the response from the functions. On-demand builders are part of Netlify's implementation of the Distributed Persistent Rendering (DPR) pattern, which adds the ability to serve large sites with dynamic content without undermining some of the core attributes of Jamstack sites.