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
- 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.
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,
}
},
]
}
},
- Migrate from
emojione
tojoypixels
.Following the migrating doc
- 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
Initial version. Works only with slack-style to Unicode