mdx icon indicating copy to clipboard operation
mdx copied to clipboard

Deep/eng 3060 code blocks line highlighting

Open deep93333 opened this issue 1 year ago • 1 comments

Summary

  • Update the dependencies to latest release (next-mdx-remote, mdx.js, rehype and remark plugins)
  • Add support for code line highlight and also made changes to examples accordingly.
  • Applied prettier using @mintlify/prettier-config

Example

Screenshot 2024-10-08 at 11 30 39 PM Screenshot 2024-10-08 at 11 25 59 PM

Test plan

To locally test this package in mint we need to link this project. To link this project i was using https://github.com/wclr/yalc i was struggling to link with yarn or npm. I found out mint project uses yarn 3 while mdx repo is using yarn 1 so there was compatibility issue.

  1. Install yalc globally
yarn global add yalc
  1. Publish it from mdx project
yalc publish
  1. Link it to mint project
yalc link @mintlify/mdx

deep93333 avatar Oct 08 '24 00:10 deep93333

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
mdx-app-router ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 22, 2024 6:52pm
mdx-pages-router ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 22, 2024 6:52pm

vercel[bot] avatar Oct 08 '24 00:10 vercel[bot]

Quick question (might not be included in the initial design): Do we need to highlight codes without languages being specified?

dks333 avatar Oct 21 '24 02:10 dks333