Skip to content

Instantly share code, notes, and snippets.

@brunosabot
Created February 27, 2022 12:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brunosabot/19298ac37429acba5234b7d6e416910b to your computer and use it in GitHub Desktop.
Save brunosabot/19298ac37429acba5234b7d6e416910b to your computer and use it in GitHub Desktop.
import { serialize } from "next-mdx-remote/serialize";
async function transformGreyMatterToMDX(post) {
const mdxSource = await serialize(post.content, {
mdxOptions: {
remarkPlugins: [],
rehypePlugins: [],
},
scope: post.data,
});
return mdxSource;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment