Plugins
Besides the basic CommonMark Spec syntax, YFM provides a set of plugins with additional features and unique markup elements.
Warning
The order of plugins is important. When adding plugins, you should specify the full set of plugins
Plugin name | Description | Parameters | Addedby default |
---|---|---|---|
Anchors | Automatically generate anchors for headers | extractTitle : Consider the first level header(type: bool, default value: false)supportGithubAnchors : Generate additional anchors compatible with GitHub(type: bool, default value: false) |
+ |
code | Display the copy button in code blocks | - | + |
Cut | Support for the cut markup | - | + |
Deflist | Support for the definition list markup | - | + |
File | Support for the file objects markup | fileExtraAttrs : additional attributes for the link |
+ |
Tasks list | Support for the tasks list | divClass : classname for div wrapping the checkbox(type: string, default value: checkbox) idPrefix : prefix for checkbox id(type: string, default value: checkbox) |
- |
Images | Add images | assetsPublicPath : Path to icons(type: string, default value: /) |
- |
Imsize | Set the image size | - | - |
Includes | Reuse content in a document | getVarsPerFile : A function that returns calculated variables using the path to the file(type: function, default value: -) |
- |
Links | Expand link syntax | - | - |
Meta | Add metadata to the beginning of files | - | + |
Notes | Support for the note markup | lang : A language for displaying the note type(type: string, default: ru) |
+ |
Sup | Output text as superscript | - | + |
Table | Support for multiline tables | - | + |
Tabs | Support for the tab markup | - | + |
Video | Add a video | - | + |
The plugins included in the YFM package are listed above. You can also add additional plugins or write your own using the markdown-it guidelines.
Was the article helpful?
Previous