Skip to content

near-sighted/gridsome-plugin-remark-emoji

 
 

Repository files navigation

gridsome-plugin-remark-emoji

CI npm

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.

Demo

You can find a demo in the following Codesandbox.

Usage

    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']
        }

Options

options.padSpaceAfter

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.

options.emoticon

Setting to true means that emoticon shortcodes are supported (e.g. :-) will be replaced by 😃). Default value is false.

License

Distributed under the MIT License.

About

Remark markdown transformer to replace :emoji: in text

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%