rehype-prism
A rehype plugin that highlights code blocks in HTML using Prism. It is used when generating documentation pages, and the Mapbox docs team no longer maintains it.
Pick a small issue you can reproduce, then fix it with your AI coding agent.
Share on XLicense: MIT
Overview
rehype-prism is a rehype plugin that highlights code blocks in HTML with Prism, through the refractor library. It looks at pre and code elements and uses the language class on the code element to pick the language. It can be used with rehype directly or in a unified pipeline that converts Markdown. It is no longer used or maintained by the Mapbox docs team.
Key features
- Highlights pre and code blocks using Prism via refractor
- Language chosen from a language-name class on the code element
- ignoreMissing option skips unknown languages instead of throwing
- alias option registers alternative language names
Best for
Node based documentation builds that need code highlighting in rehype. It is unmaintained since April 2024, and the README suggests lighter ways to highlight in the browser.
- Upstream
- mapbox/rehype-prism
- Fork on GitHub
- Guo-astro/rehype-prism
- Upstream stars
- 173
- Category
- Developer tools and infrastructure
- Language
- JavaScript
- License
- MIT
- Forked
- 2020-11-01
- Sync status
- In syncLast synced 2026-10-19
More in Developer tools and infrastructure
An open-source TypeScript engine for calculating Zi Wei Dou Shu charts and consulting traditional references. It helps developers build charting and interpretation tools.
Forked 2026-10-18Last synced 2026-10-19License: MITDeveloper tools and infrastructureGitHub
ImHex is a hex editor for inspecting and editing binary files. Reverse engineers, programmers, and forensic users can search and patch bytes or describe file structures with its pattern language.
Forked 2026-10-17Last synced 2026-10-19License: GPL-2.0Developer tools and infrastructureGitHub
Numa is a portable DNS resolver for local development and privacy. It blocks ads, gives local services names like frontend.numa, and runs without depending on a cloud account.
Forked 2026-10-17Last synced 2026-10-19License: MITDeveloper tools and infrastructureGitHub
Handwired turns ordinary JavaScript logic into differentiable neural-network-style calculations, so programs can run as matrix operations in JavaScript or WebGPU. It is for experimenting with GPU execution and optimization of code written in a traditional style.
Forked 2026-10-16Last synced 2026-10-19License: MITDeveloper tools and infrastructureGitHub