DEV Community

loading...

Discussion on: Build A Next.js Markdown Blog.

Collapse
therajuahammad profile image
Raju Ahammad

Thanks for your awesome post.

My MD(markdown) file name is like prnt.sc/vwwc6p
My URL is like prnt.sc/vwwd67.

Now I want to custom slug.

example:
my blog title is - LABORE ET DOLORE

I want to URL like "labore-et-dolore"

is it possible?

Collapse
imranib profile image
Imran Irshad Author

in the above example, your MD file name and slug must be by the same name. because we are getting the file name from URL(query string) and that query string is your slug. with that query string, we are reading the file (by its name).
Your blog title can be whatever you want it to be.

Collapse
therajuahammad profile image
Raju Ahammad

Can it possible to filter the MD file by blog title or id?