Docs next
Compare changes
+ 101
− 0
To use the Drupal API Client with the Next.js App Router, you can follow the recommendations in the Next.js docs to [fetch data on the server with third-party libraries](https://nextjs.org/docs/app/building-your-application/data-fetching/fetching-caching-and-revalidating#fetching-data-on-the-server-with-third-party-libraries).
The example below uses a [catch-all route segment](https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes#catch-all-segments) for all dynamic paths on the site. Within getStaticParams we retrieve all articles from Drupal, and then our Page function will generate the page in question.