This repository describes the basic way how to generate dynamic routes in nextjs. The [[...slug]].js file must create all the logic to build the index which will contain the blog paginator.
First, run the development server:
npm run dev
# or
yarn dev
To generate static files:
npm run build
To create dynamic routes in [[...slug]].js, we have to return in getStaticPaths function this Object:
To learn more about Next.js, take a look at the following resources:
- Learn Dynamic Routes
- Next.js Documentation - learn about Next.js features and API.