SSG (Static Site Generation)

This page was pre-rendered at build time and will never change unless you rebuild.

Static Data

Build Time (Static):

2026-01-02T18:54:06.641Z

Data Timestamp:

2026-01-02T18:54:06.641Z

Message:

This data was generated at build time and is completely static

Static Items:

  • Static Item 1 - Generated at build
  • Static Item 2 - Never changes
  • Static Item 3 - Ultra fast delivery
  • Static Item 4 - SEO optimized
  • Static Item 5 - Perfect for content that rarely updates

⚡ How SSG Works

  • • Pages are generated at build time (npm run build)
  • • HTML is created once and served to all users
  • • Fastest possible page loads - just serving static files
  • • Data doesn't change until you rebuild and redeploy
  • • Perfect for content that rarely changes

Code Example

export const getStaticProps: GetStaticProps = async () => {
  // Fetch data at build time
  const res = await fetch('https://api.example.com/data')
  const data = await res.json()

  return {
    props: {
      data,
      buildTime: new Date().toISOString(),
    },
    // No revalidate = static generation only
  }
}

Use Cases

  • Marketing Pages: Landing pages, about pages, pricing pages
  • Documentation: API docs, user guides, FAQs
  • Blogs: Blog posts that don't need frequent updates
  • Portfolio Sites: Personal websites, project showcases

Advantages

⚡ Performance

Fastest possible page loads with pre-rendered HTML

💰 Cost

Lower hosting costs - just serving static files

🔒 Security

Reduced attack surface with no server-side processing

📊 SEO

Excellent SEO with fully rendered HTML

This page will show the same timestamp no matter how many times you refresh!