I made *a thing* so that I could play with using #serverless functions to render pages on the fly while a site deployment completes.
You can play with it here: https://vlolly.net
And you can read all about it on @css
https://css-tricks.com/static-first-pre-generated-jamstack-sites-with-serverless-rendering-as-a-fallback/