Skip to content

How to expose meta/frontmatter in MDXProvider? #2037

Answered by omidantilong
omidantilong asked this question in Q&A
Discussion options

You must be logged in to vote

Hey @wooorm / @ChristianMurphy

I have created a plugin specifically for this problem. It replaces the remark-mdx-frontmatter plugin and inserts an export function getStaticProps() {} in the compiled mdx with all your frontmatter in.

https://github.com/omidantilong/remark-mdx-next

Cheers

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
2 replies
@omidantilong
Comment options

@wooorm
Comment options

Comment options

You must be logged in to vote
3 replies
@omidantilong
Comment options

@remcohaszing
Comment options

@omidantilong
Comment options

Answer selected by omidantilong
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants