0

I try to create NextJS component for my content project.

I am using this starter:

https://github.com/timlrx/tailwind-nextjs-starter-blog

which use MDX for rendering Markdown documents.

In my .md file I'd like to use the following structute:

`<Proscons>
[-] cons
[-] cons
[+] pros
</Proscons>`

Please help me, thanks!


I added MDX component to my NextJS project:

`const Proscons = ({ ...rest }) => 
<div className="alert alert-secondary" {...rest} />
export default Proscons`

I want to convert 'Proscons' content (from .md file) to a string and then convert it to array with pros and cons list as HTML UL list.

The problem that I don't know how to get content which I can convert to array.

Priyen Mehta
  • 1,096
  • 1
  • 5
  • 19
Ilia
  • 1
  • 2

0 Answers0