// Build every post ahead of time,
// then refresh it in the background every minute
export const revalidate = 60;
export async function generateStaticParams() {
const posts = await getPosts();
return posts.map((post) => ({ slug: post.slug }));
}Deep dive: Speed
Pages built ahead of time, served instantly
Next.js can build pages ahead of time and refresh them in the background, or render them on the server for each visit. Visitors get fast first loads, stable layouts and pages that respond quickly.
- Static generation with background refresh
- Server-side rendering when you need it
- Automatic image and font optimisation
- Strong Core Web Vitals scores

