dynamic route

A route whose folder name is in square brackets, such as [slug], so one page file serves many URLs.

In more detail

app/blog/[slug]/page.tsx answers /blog/hello and /blog/world; the matched text arrives in params.slug. Combine with generateStaticParams to pre-render known values at build time.

Related terms

Taught in

References