The static site generator is the markup part of the JAM Stack. You feed it templates and markdown files, and it spits out flat HTML files that result in a super fast experience for your users.
Why is that a good thing?
In a word: resilience (shout out to Jeremy Keith).
It also removes the “flash of content” that happens after a JS file loads and generates content client-side after the page itself has already been rendered. And, because you’re baking that content directly into the HTML, it reduces API calls and overall server load.
How it works
Today’s major static site generators all include the ability to generate content from JSON data files. They also provide functions you can use to fetch content from an API and use with this feature.
See it in action
I use this approach on my sites. I have an API that serves up my calls-to-action and testimonials so that I can update them in a single place. Hugo fetches the data and bakes the content directly into the HTML.