-
-
Save brunosabot/5dcd2b0374bb7445b1248d3ec0fdad78 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { serialize } from "next-mdx-remote/serialize"; | |
import gist from "./lib/gist"; | |
async function transformGreyMatterToMDX(post) { | |
const mdxSource = await serialize(post.content, { | |
mdxOptions: { | |
remarkPlugins: [gist], | |
rehypePlugins: [], | |
}, | |
scope: post.data, | |
}); | |
return mdxSource; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment