Skip to content
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

Support MD and MDX #261

Open
dario-piotrowicz opened this issue Jan 16, 2025 · 2 comments
Open

Support MD and MDX #261

dario-piotrowicz opened this issue Jan 16, 2025 · 2 comments

Comments

@dario-piotrowicz
Copy link
Contributor

dario-piotrowicz commented Jan 16, 2025

One very common type of Next.js applications are applications that render content base on MD or MDX files.

The Next.js docs have a whole page dedicated to this.

We should investigate and make sure that we can support this patten, in particular it would be good to make sure that we can support the Next.js official MDX solution: @next/mdx.


We should also make sure to support Remote MDX is possible.

@james-elicx
Copy link
Collaborator

MDX files are normally pre-rendered to HTML at build-time and therefore pages using them work fine.

You would of-course run into a problem when you want to try and do things at run-time for two reasons;

  • There is no file-system available.
  • eval/function constructors are not allowed, and that is normally how mdx libraries work.

I'm not sure there is really anything to do here.

@vicb
Copy link
Contributor

vicb commented Jan 26, 2025

I believe the file system is not a problem when you (re)write your app to use i.e. remote mdx

eval is probably needed to render the jsx. It might be worth looking for libs embedding react for rendering?

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

No branches or pull requests

3 participants