Skip to Content
DocsNextraFeaturesNext.js Static Rendering

Next.js Static Rendering

Static Rendering  is default server rendering strategy, where routes are rendered at build time or in the background after data revalidation . The result is cached and can be distributed via a Content Delivery Network (CDN)  for optimal performance.

Static rendering is ideal for routes with non-personalized data that can be determined at build time, such as blog posts or product pages.

Nextra has 12840 stars on GitHub!

The number above was generated at build time via MDX server components. With Incremental Static Regeneration  enabled, it will be kept up to date.


Here’s the MDX code for the example above:

ssg.mdx
export async function Stars() { const response = await fetch(`https://api.github.com/repos/shuding/nextra`) const repo = await response.json() const stars = repo.stargazers_count || 0 return <b>{stars}</b> } > Nextra has <Stars /> stars on GitHub!
Last updated on