Next.js Discord

Discord Forum

Markdown with NextJS13

Unanswered
Sloth bear posted this in #help-forum
Open in Discord
Sloth bearOP
I'm making a blog with sanity and NextJS. I want to render the blog with markdown should i use mdx or a package that allows markdown within my jsx?

5 Replies

I think you can render the content with https://github.com/portabletext/react-portabletext ?
@Ray I think you can render the content with https://github.com/portabletext/react-portabletext ?
Sloth bearOP
i see but I have rendered it but is there anyway to get cool markdown styles like code snippets and the headings or does that have to be done manually?
by manually i mean css/tailwind
Sloth bearOP
i think the best solution is to use mdx in nextjs and configure it
@Sloth bear i think the best solution is to use mdx in nextjs and configure it
You can use the one from nextjs: https://nextjs.org/docs/app/building-your-application/configuring/mdx
The headings, blockquotes, … will be configured by you