Skip to content

[Feature Request] export #119

@alexanderbluhm

Description

@alexanderbluhm

It would be very nice to use export in the .mdx files to better use layouts and other stuff. I also saw a few issues here where users tried to do this.

In my use case I am building a table of contents which should be rendered next to the markdown content.
I have a custom remark plugin which simply creates a list of all headings. In another project I simply write
export const toc = content which is pretty useful because I can now use this toc e.g. as the sidebar of my current layout.

In the current mdx-remote implementation I think the easiest way would be to parse the headings and insert the result into the frontmatter part but this is a bit ugly.

So maybe this feature will be implemented in the future :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions