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

Replace Prism code highlighter with Shiki #166

Open
lachlancollins opened this issue Jan 28, 2024 · 0 comments
Open

Replace Prism code highlighter with Shiki #166

lachlancollins opened this issue Jan 28, 2024 · 0 comments

Comments

@lachlancollins
Copy link
Member

Problem

The Prism code highlighter is quite limited for our use case, where we are commonly rendering languages like Vue or Svelte. Even JSX highlighting is often poor - see below:

image

Shiki is a modern alternative which uses the same engine as VS Code, meaning that how it looks on the site will be how it looks in VS Code. Unfortunately, it is ESM-only which has been challenging to implement in Remix.

Potential Solution

rehype-pretty-code - uses Shiki, hooks into unified/remark/rehype ecosystem (used by react-markdown).

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

No branches or pull requests

1 participant