Ssg

Static Site Generation for fast, pre-rendered web pages

NeuralBlitz Updated 1 repo stars

File contents

What I do

  • Generate static HTML at build time
  • Use getStaticProps
  • Implement getStaticPaths
  • Create dynamic static pages

When to use me

When building fast, cacheable websites with dynamic content.

Next.js SSG

// pages/posts/[id].js
export async function getStaticPaths() {
  const posts = await fetchPosts();
  return {
    paths: posts.map(p => ({ params: { id: p.id } })),
    fallback: false
  };
}

export async function getStaticProps({ params }) {
  const post = await fetchPost(params.id);
  return { props: { post } };
}

export default function Post({ post }) {
  return <article><h1>{post.title}</h1></article>;
}

NeuralBlitz/Agent-Gateway/tree/main/agent-gateway/skills/user/ssg commit 1ede298aa7

Frequently asked questions

npx skillmds@latest add neuralblitz/ssg