Skip to content

Consider supporting MDX exports #64

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
schickling opened this issue Dec 6, 2021 · 3 comments
Open

Consider supporting MDX exports #64

schickling opened this issue Dec 6, 2021 · 3 comments

Comments

@schickling
Copy link
Collaborator

Additionally to defining document properties in frontmatter, MDX also supports defining properties as export statements (see MDX docs). We should consider to support this feature in Contentlayer.

@schickling schickling added feature New feature or request pkg/source-files labels Dec 6, 2021
@meleksomai
Copy link

@schickling , do you have an idea how to use this? I like to be able to access exports property of an MDX file and be able to use it in the computedFields for instance.

@reubn
Copy link

reubn commented Jun 11, 2022

@schickling This is preventing me from moving to Contentlayer

@schickling schickling added this to the Pre-1.0 milestone Jul 5, 2022
@schickling
Copy link
Collaborator Author

My current idea to address this would be to let the user specify the expected export const myField = ... fields as actual document fields.

I'd love to hear more feedback on this design suggestion!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants