rehype-sanitize
Removes everything that is not on an allowlist, so untrusted HTML cannot run scripts or inject dangerous attributes.
In-depth pages for widely used rehype plugins. Every plugin listed here is real, published on npm, and was installed and run to produce the examples on its page.
rehype-sanitizeRemoves everything that is not on an allowlist, so untrusted HTML cannot run scripts or inject dangerous attributes.
rehype-formatPretty-prints HTML: consistent indentation and line breaks, while respecting whitespace-sensitive elements.
rehype-preset-minifyA preset of 23 small minification plugins plus serializer settings that shrink HTML for production.
rehype-highlightHighlights code blocks at build time with highlight.js grammars through lowlight, so pages ship no highlighter.
rehype-slugAdds GitHub-style id attributes to h1–h6 headings so every section gets a stable link target.
rehype-autolink-headingsAdds links from headings to themselves so readers can copy a link to any section.
rehype-external-linksAdds rel (and optionally target) attributes to links that point to other sites.
rehype-rawTurns raw HTML strings embedded in Markdown into real hast nodes, so other plugins can see and process them.
rehype-remarkConverts an HTML tree (hast) into a Markdown tree (mdast), the bridge from rehype to remark.
rehype-documentWraps a fragment in a complete HTML document with doctype, head, title, viewport, stylesheets and scripts.
No plugins match that filter. Try the Plugin Explorer, which covers a wider list.
The Plugin Explorer indexes a wider set of real plugins and builds the install command for you.