remark is an ecosystem of plugins for processing markdown built on unified. The project parses and compiles markdown, and lets programs process markdown without ever compiling to HTML (it can though). Powered by plugins to do all kinds of things: check markdown code style, transform safely to React, add a table of contents, or compile to man pages.
remark has lots of tests (800+), great coverage (100%), and a free license.
View the project on GitHub or inspect the syntax tree on AST Explorer.
The Command Line Interface is powerful, it supports all settings the API provides and has built-in support for regenerating markdown files in a project according to a given style-guide, and emits warnings triggered by plugins in a beautiful fashion.
example.md looks as follows:
Now, by running remark in a terminal we’ll see the following:
Read more about the CLI in its
The Application Programming Interface is the gist of remark and the CLI.
It’s provided by
unified so head to its
for more info.
Say we have the following
index.js file using
Now, after installing dependencies and running
with Node, you’ll see the following:
unified is an interface for processing text with syntax trees and transforming between them. Three syntaxes are connected to unified, each coming with a syntax tree definition, and a parser and stringifier: mdast with remark for markdown, nlcst with retext for prose, and hast with rehype for HTML.
unified also bridges between syntaxes, such as between markdown and HTML, as can be seen below:
View the unified project on GitHub or peruse the website.