This page was rendered at build time. Refresh as many times as you want — the timestamp never changes until you run next build again.
↑ This timestamp never changes on refresh. That's SSG.
Fetched at build time — could be from a CMS, MDX files, or database.
// app/blog/page.tsx — SSG (default behavior)
// Optional: explicit revalidation = false means pure static
export const revalidate = false;
export default async function BlogPage() {
// fetch() with no options → cached at build time
const posts = await fetch("https://api.example.com/posts");
const data = await posts.json();
return <PostList posts={data} />;
}// For dynamic SSG routes: generateStaticParams()
export async function generateStaticParams() {
const posts = await getPosts();
return posts.map((p) => ({ slug: p.slug }));
} // replaces getStaticPaths from Pages Routerexport async function getStaticProps() {
const data = await fetchPosts();
return { props: { data } };
}
// For dynamic routes:
export async function getStaticPaths() {
return { paths: [...], fallback: false };
}