This is a remark plugin to replace :emoji:
to real UTF-8 emojis in text.
It's a modification of remark-emoji
that strips out all ESM-only dependencies, and allows it to be used with Gridsome as a plugin of gridsome-plugin-remark-container
.
You can find a demo in the following Codesandbox.
npm install -s gridsome-plugin-remark-emoji
In your gridome.config.js
:
transformers: {
remark: {
externalLinksTarget: "_blank",
externalLinksRel: ["nofollow", "noopener", "noreferrer"],
anchorClassName: "icon icon-link",
plugins: ["gridsome-plugin-remark-container",
'gridsome-plugin-remark-emoji']
}
Setting to true
means that an extra whitespace is added after emoji.
This is useful when browser handle emojis with half character length and following character is hidden.
Default value is false
.
Setting to true
means that emoticon shortcodes are supported (e.g. :-) will be replaced by 😃).
Default value is false
.
Distributed under the MIT License.