Skip to content

Rulikkk/gatsby-remark-emoji

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

19 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

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

Buy me a coffee!

Usage

  1. Install plugin to your site:
yarn add gatsby-remark-emoji
  1. Add following to your gatsby-config.js:
    plugins: [      
      {
        resolve: `gatsby-transformer-remark`,
        options: {
          plugins: [
            `gatsby-remark-emoji`,  // <-- this line adds emoji
          ]
        }
      },
  1. 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.4

  • Migrate from emojione to joypixels.Following the migrating doc

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