Closed o-az closed 4 months ago
A plugin/component that can be imported and used as a React Server Component. Essentially this example packaged packaged: https://rehype-pretty-code.netlify.app/#react-server-component
It will probably look something like this:
import { PrettyCode } from '@rehype-pretty/rsc' export default async function Page() { return ( <PrettyCode // theme, language, code/filepath, etc. /> ) }
I'm not yet sure if this is feasible but it might be a good idea to do this instead and make it framework agnostic:
import { PrettyCode } from '@rehype-pretty/mdx'
Or if not feasible then: '@rehype-pretty/<framework>'
'@rehype-pretty/<framework>'
A plugin/component that can be imported and used as a React Server Component. Essentially this example packaged packaged: https://rehype-pretty-code.netlify.app/#react-server-component
It will probably look something like this:
I'm not yet sure if this is feasible but it might be a good idea to do this instead and make it framework agnostic:
Or if not feasible then:
'@rehype-pretty/<framework>'