Unified plugins
These are the built-in plugins that are used by the transformer.
"remark-frontmatter"
It's configured to use the "yaml"
format by default.
TOML
If you want to use TOML, change the options
property of remarkFrontmatter
plugin to toml
.
If you want to use both Yaml and TOML, change it to ["yaml", "toml"]
.
You also need to add a plugin to parse the TOML content and pass in to a property called frontmatter
in file.data
. Learn how it's done for Yaml in "remark-frontmatter-yaml".
Add you custom plugin inside the builtinPlugins
after remarkFrontmatter
.
NOTE
Please refer to the jsDoc comments to learn more.
Related resources
"remark-frontmatter-yaml"
NOTE
Please refer to the jsDoc comments to learn more.
Related resources
"remark-gfm"
NOTE
Please refer to the jsDoc comments to learn more.
"remark-github-alerts"
IMPORTANT
This plugin is a fork of "remark-github-alerts". It's an improved version with some minor changes to the API.
To get the built-in styles working for this plugin, add the following code into your layout file:
All importable styles:
NOTE
Please refer to the jsDoc comments to learn more.
"remark-unwrap-images"
NOTE
Please refer to the jsDoc comments to learn more.
"remark-toc"
NOTE
Please refer to the jsDoc comments to learn more.
Related resources
"remark-directive"
This plugin is used to create custom built-in directives. Built-in directives:
info
warning
danger
success
tip
details
Input:
Output:
"rehype-slug"
NOTE
Please refer to the jsDoc comments to learn more.
"rehype-pretty-code"
"rehype-autolink-headings"
NOTE
Please refer to the jsDoc comments to learn more.
Example usage
Related resources
"rehype-external-links"
This plugin sets the target
attribute to "_blank"
and the rel
attribute to "nofollow noopener noreferrer"
for hyperlinks containing "http://"
or "https://"
.
NOTE
Please refer to the jsDoc comments to learn more.