Catch-all dynamic routes examples
You can change the url yourself to about anything you want, with multiple nested levels.
The page will be dynamically generated as static page (fallback: true) and served as a static page from now on.
URL The page will be dynamically generated as static page (fallback: true) and served as a static page from now on.
slug
parameters:
Go to some nested path
This feature allows you to use a dynamic page (catch-all) that will build subpages dynamically based on the parameters you provide.
It's extremely powerful and can be used to dynamically generate product pages, for instance.
You can also combine it with the
It's extremely powerful and can be used to dynamically generate product pages, for instance.
You can also combine it with the
revalidate
option so that your page gets refreshed based on your revalidation strategy, to keep the content up-to-date, for instance.Make sure you use
fallback: true
when using SSG, otherwise it'll generate a 404 page, and won't be able to dynamically generate the page.