gridsome-plugin-remark-emoji

1.1.3 • Public • Published

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.

Package Sidebar

Install

npm i gridsome-plugin-remark-emoji

Weekly Downloads

0

Version

1.1.3

License

MIT

Unpacked Size

14.6 kB

Total Files

5

Last publish

Collaborators

  • humanman