gatsby-remark-emoji
Adds slack-style emoji to gatsby's markdown 👍!
See usage, configuration and changelog below. By configuring, you can make this plugin to convert:
- Slack-style emoji to gatsby's markdown:
:smile: -> 😀
- Unicode emoji to short-code:
😀 -> :smile:
- Slack-style and/or Unicode emoji to images
Usage
- Install plugin to your site:
yarn add gatsby-remark-emoji
- Add following to your
gatsby-config.js
:
plugins: resolve: `gatsby-transformer-remark` options: plugins: `gatsby-remark-emoji` // <-- this line adds emoji
- Restart gastby.
Configuration
Plugin actually supports all js conversion modes from Emojione, default mode is shortNameToUnicode
(described here).
This is config with options:
plugins: resolve: `gatsby-transformer-remark` options: plugins: resolve: 'gatsby-remark-emoji' // <-- this adds emoji options: // default emojiConversion --> shortnameToUnicode emojiConversion: 'shortnameToUnicode' // when true, matches ASCII characters (in unicodeToImage and shortnameToImage) // e.g. ;) --> 😉 ascii: false
Changelog
v0.0.2
- Merged #1 that adds more conversion options
- Improved docs about conversion options and added changelog
- Added keywords to
package.json
per gatsbyjs/gatsby#4394 - Added repository to
package.json
v0.0.1
Initial version. Works only with slack-style to Unicode