remark is an ecosystem of plugins.
See tools built with remark ».
Have a good idea for a new plugin? Let’s chat and make it happen!
remark-abbr
— Custom syntax to handle abbreviations, custom mdast inline node typeabbr
. Rehype compatible (<abbr title="bar">foo</abbr>
)remark-align
— Custom syntax to handle text/block alignment, custom mdast block node typeCenterAligned
,RightAligned
. Rehype compatible (wraps indiv
s with alignment as configurable CSS class)remark-attr
— Add support for custom attributes to markdownremark-autolink-headings
— Automatically add GitHub style links to headingsremark-bookmarks
– Link manager for Markdown filesremark-bracketed-spans
– Add an id, classes, and data attributes to<span>
tags in markdownremark-breaks
– Breaks support, without needing spacesremark-collapse
— Make a section collapsibleremark-comment-blocks
— Wrap Markdown with a comment blockremark-comment-config
— Configure remark with commentsremark-comments
— Configurable custom syntax to ignore parts of the Markdown inputremark-contributors
— Inject a given table of contributorsremark-custom-blocks
— Configurable custom syntax to parse custom blocks, creating new mdast node types. Rehype compatibleremark-defsplit
— Extract inline link and image destinations as separate definitionsremark-disable-tokenizers
— Disable any or all remark’sblockTokenizers
andinlineTokenizers
remark-embed-images
— Embed images with data: URIs, inlining base64-encoded sourcesremark-emoji
— Transform unicode emoji to Gemoji shortcodesremark-emoji-to-gemoji
— Transform Gemoji shortcodes to unicode emojiremark-external-links
— Automatically adds the target and rel attributes to external linksremark-first-heading
— Replacing the first heading in a documentremark-fix-guillemets
— For weird typographic reasons, this fixes<<a>>
being parsed as<
+ html tag<a>
+>
and instead replaces this with text<<a>>
remark-frontmatter
– Frontmatter (yaml, toml, and more) supportremark-gemoji
— Gemoji short-code support in remarkremark-gemoji-to-emoji
— Transform Gemoji shortcodes to Unicode emojiremark-generic-extensions
— Commonmark generic directive extensionremark-github
— Auto-link references like in GitHub issues, PRs, and commentsremark-gitlab-artifact
— Download artifacts from GitLab projects to live alongside your Markdownremark-grid-tables
— Custom Markdown syntax to describe tables. Rehype compatibleremark-graphviz
— Replacedot
graphs with rendered SVGsremark-heading-gap
— Adjust the gap between headingsremark-highlight.js
— Highlight code blocks in Markdown files with highlight.jsremark-html
— Compile Markdown to HTML documentsremark-html-emoji-image
— Transform unicode emoji to HTML imagesremark-html-katex
— Transform math inline and block nodes to styled HTML equations with KaTeXremark-iframes
— Custom syntax with fully configurable iframe providers, following a whitelist approach. Rehype compatibleremark-inline-links
— Transform references and definitions to normal links and imagesremark-inline-math
— Inline math supportremark-kbd
— Custom syntax, parses||foo||
into a new mdast inline node typekbd
. Rehype compatible (<kbd>foo</kbd>
)remark-license
— Add a license sectionremark-lint
— Markdown code style linterremark-man
— Compile Markdown to Man pages (roff)remark-math
— Math inline and block supportremark-mermaid
— Replace mermaid graphs with rendered SVGsremark-message-control
— Enable, disable, and ignore messagesremark-metadata
— Add metadata about the processed file as front matterremark-midas
— Highlight CSS in Markdown files with midasremark-normalize-headings
— Ensure at most one top-level heading is in the documentremark-openapi
— Convert links to local or remote OpenAPI definition to tables with summaries of all pathsremark-parse-yaml
— Parse YAML blocks into structured dataremark-ping
— Custom syntax, parses@user
,@**first last**
, configurable existence check. Rehype compatibleremark-react
— Compile Markdown to Reactremark-react-codemirror
— Syntax highlighting for remark-react through CodeMirrorremark-react-lowlight
— Syntax highlighting for remark-react through lowlightremark-reference-links
— Transform links and images to references and definitionsremark-rehype
— rehype supportremark-retext
— retext supportremark-rewrite-headers
— Change heading levelsremark-shortcodes
— Parses custom Wordpress/Hugo-like shortcodes inside your Markdownremark-slug
— Add slugs to headingsremark-strip-badges
— Remove badges (such asshields.io
)remark-strip-html
— Remove html formattingremark-squeeze-paragraphs
— Remove empty paragraphsremark-sub-super
— Custom syntax to parse subscript and superscript. Rehype compatible (using<sub>
and<sup>
)remark-swagger
— Insert a swagger specificationremark-textr
—Textr
, a modular typographic frameworkremark-title
— Check and inject the title of a markdown as the first element.remark-toc
— Generate a Table of Contents (TOC) for Markdown filesremark-unlink
— Remove all links, references and definitionsremark-usage
— Add a usage example to your readmeremark-validate-links
— Validate links point to existing headings and filesremark-vdom
— Compile Markdown to VDOMremark-wiki-link
— Parse and render wiki linksremark-yaml-annotations
— Extend Markdown with YAML-based annotation syntaxremark-yaml-config
— Configure remark with YAML
See npm search for available and often inspirational presets.
See MDAST for a list of utilities for working with
the syntax tree. See unist
for other utilities which work with
MDAST nodes, too.
And finally, see vfile for a list of utilities working with virtual files.
To use a plugin programmatically, invoke the use()
function.
To use plugin with remark-cli
, pass a --use
flag
or specify it in a configuration file.
First, read up on the concept of plugins. Then, read the guide on “Creating a plugin with unified”. Finally, take one of existing plugins, which looks similar to what you’re about to do, and work from there. If you get stuck, issues and Gitter are good places to get help.
You should pick a name prefixed by 'remark-'
, such as remark-lint
.
Note that, if the thing you create cannot be given to remark().use()
,
it isn’t a “plugin”. Don’t use the remark-
prefix as that could
confuse users. If it works with the HAST tree, use 'mdast-util-'
, if
it works with any Unist tree, use unist-util-
, if it works with virtual
files, use vfile-
.