How to use slug URL to show individual article instead of mapping it using ID in NextJS 14

I want to show my articles using the slug URL that I created in my Strapi backend but I can only use the default ID for now. How can I achieve this?

This topic has been created from a Discord post (1283485086041509921) to give it more visibility.
It will be on Read-Only mode here.
Join the conversation on Discord

You could give Webtools
Plugin a try.

It has a router endpoint with which you can get your pages by their slugs strapi-webtools/packages/core at master · pluginpal/strapi-webtools · GitHub

Hi <@545167802873675776> You have multiple options here.

When you fetch the list of entries you have there slug so you can generate url with the slug.

To fetch a single entry by slug right now you have to fetch the list with a filter on slug like so with a limit to 1

GET /api/content-type?filters=[slug][yourslug]&pagination[limit]=1