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

Update syntax-highlighting.server.mdx #1894

Closed
wants to merge 2 commits into from
Closed

Conversation

godmar
Copy link

@godmar godmar commented Jan 9, 2022

add a note about the necessity of ESM for rehype.

add a note about the necessity of ESM for rehype.
@vercel
Copy link

vercel bot commented Jan 9, 2022

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/mdx/mdx/4VE1p722yRZX8BVm14vqY4GUcUZY
✅ Preview: https://mdx-git-fork-godmar-patch-1-mdx.vercel.app

@codecov-commenter

This comment has been minimized.

Copy link
Member

@ChristianMurphy ChristianMurphy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This generally applies to all remark and rehype plugins. (Since unifiedjs/unified#121)
Not just rehype-highlight, it may make sense to add the note to https://mdxjs.com/docs/getting-started/#nextjs

@godmar
Copy link
Author

godmar commented Jan 9, 2022

This is the first time I've used the "edit" on github feature. I thought it would be a low overhead way to propose a change - turns out though that github just forked your repo and added a branch in my account! Anyway, I added another commit to my proposal.

@wooorm
Copy link
Member

wooorm commented Jan 10, 2022

I don’t think this is the place to explain how to use ESM for MDX with each tool, or that all plugins are ESM. It would become a giant section, which is very similar to the existing Getting started or Extending MDX articles.

How about instead using ESM for the example in Getting started: https://mdxjs.com/docs/getting-started/#nextjs

@wooorm wooorm closed this Jan 10, 2022
@wooorm wooorm added 🙅 no/wontfix This is not (enough of) an issue for this project 👎 phase/no Post cannot or will not be acted on labels Jan 10, 2022
@godmar
Copy link
Author

godmar commented Jan 10, 2022

Then please do it yourself.

I had an afterthought on this: the next.js starter, as of today, doesn't create a next.config.mjs file. So for people using the next.js starter, all the documentation for the rehypePlugins etc. is out of date from the get-go.

@wooorm
Copy link
Member

wooorm commented Jan 10, 2022

mdx-js/.github#29

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🙅 no/wontfix This is not (enough of) an issue for this project 👎 phase/no Post cannot or will not be acted on
Development

Successfully merging this pull request may close these issues.

None yet

4 participants