The source code for this blog is available on GitHub.

Blog.

New sample client

Cover Image for New sample client
A

As a developer, you know that having a variety of sample clients is essential. It helps you understand how your product works in different contexts and ensures that your solution is as robust and flexible as possible. While working on Blockenberg, I've been focusing on improving the product, and as part of that, I've been examining different sample client implementations.

One of the main limitations of SSG (static site generators) is the need to regenerate the content every time it changes. This is not a problem with the frameworks that use SSG - it's simply a natural outcome of the technology. There are several solutions to this problem, but one of the best is something called on-demand ISR (incremental static regeneration).

Clever people at Vercel have developed on-demand ISR, which is an engine that renders static websites on the compilation and adds new content when it is published. This approach combines the best of both worlds, as it allows for fast, static site generation while still allowing for dynamic content updates. However, it relies on the CMS's ability to call the update webhook, and until now, this feature was missing from Blockenberg.

That's why I'm excited to announce that Blockenberg now has built-in support for the update webhook. When you open the configuration (by clicking on your avatar), you'll see a new field where you can add a webhook URL. If you're using a Next.js sample client, the webhook URL might look something like "https://yourserver.com/api/webhook". Once you've set this webhook URL, it will be called every time you publish an article. You can use it to regenerate the whole site in a SSG way, ensuring that your content stays up-to-date and your site remains fast and responsive.

I hope this new feature will be useful for all the developers using Blockenberg, and I'm looking forward to seeing the creative ways you'll use it to improve your sites.