Skip to content

Latest commit

 

History

History
436 lines (400 loc) · 24.5 KB

plugins.md

File metadata and controls

436 lines (400 loc) · 24.5 KB

remark

Plugins

remark is a tool that transforms markdown with plugins. See the monorepo readme for info on what the remark ecosystem is. This page lists existing plugins.

Contents

List of plugins

For the most awesome projects in the ecosystem, see remarkjs/awesome-remark. More plugins can be found on GitHub tagged with the remark-plugin topic.

👉 Note: some plugins don’t work with recent versions of remark due to changes in its underlying parser (micromark). Plugins that are up to date or unaffected are marked with 🟢 while plugins that are currently broken are marked with ⚠️.

💡 Tip: remark plugins work with markdown and rehype plugins work with HTML. See § List of plugins in rehypejs/rehype for more plugins.

The list of plugins:

List of utilities

For things that work with the syntax tree used in remark for markdown, see § List of utilities in syntax-tree/mdast. For tools that work with mdast and other syntax trees, see § List of utilities in syntax-tree/unist. For tools that work with the virtual file format used in remark, see § List of utilities in vfile/vfile.

Use plugins

To use a plugin programmatically (from JavaScript), call the use() method. To use plugin with remark-cli (from the terminal), pass a --use flag or specify it in a configuration file.

Create plugins

To create a plugin, first read up on what they are in § Plugin in unifiedjs/unified. After that read § Create a remark plugin on unifiedjs.com for a practical introduction. Finally take one of the existing plugins, which looks similar to what you’re about to make, and work from there. If you get stuck, discussions is a good place to get help.

You should pick a name prefixed by remark- (such as remark-lint). Do not use the remark- prefix if the thing you create doesn’t work with remark().use(): it isn’t a “plugin” and will confuse users. If it works with mdast use mdast-util-. If it works with any unist tree use unist-util-. If it works with virtual files use vfile-.

Use default exports to expose plugins from your packages. Add remark-plugin keywords in package.json. Add a remark-plugin topic to your repo on GitHub. Create a pull request to add the plugin here on this page!