OpenMoji Jekyll Plugin

OpenMoji Jekyll Plugin

Bring beautiful OpenMoji emojis to your Jekyll websites.

OpenMoji is a free and open source emoji library which can be used for variety of purposes. it is licensed under CC BY-SA 4.0 .

Open Source License: GPLv3 Language counter Top language
CodeFactor CodeClimate rating CodeClimate technical debt CodeClimate issues
pipeline status CodeClimate
OpenMoji Version Gem Version jsDelivr CDN

If you are viewing this repository on GitHub, this GitHub repository is a mirror of the OpenMoji Jekyll Plugin, the main repository is served on GitLab, all developments and discussions, issue tracking and merge requests take place in GitLab.

This project is a fork of Jemoji.

This project is independent from OpenMoji project.

Enjoy a free open source emoji package

Use more than 3,000 emojis from OpenMoji package for free in your jekyll website. but remember to credit the OpenMoji project somewhere in your site to comply with their license.

Connect to any other emoji source

Use any available emoji package from a CDN or locally served emoji images by adding roughly 5 lines to your website's config file.

Preview

see a preview of OpenMoji emojis with their aliases.

Quick start

1. Add the following to your site's Gemfile

gem 'jekyll-openmoji'

2. Add the following to your site's _config.yml

plugins:
  - jekyll-openmoji

3. Open terminal and use bundler to install this new gem.

bundle install

4. Next steps

In any page or post, use emoji as you would normally, e.g.

I give this plugin two :thumbs_up:!

with this plugin, Jekyll will turn this markdown code (aka emoji alias) :thumbs_up: into this image: 👍️ .

to see all codes and their emoji images, see preview page.

Customizing

If you'd like to serve emoji images locally, or use a custom emoji source, you can specify so in your _config.yml file:

emoji:
  # for other emoji packs providing a src key is required.
  # images will be served from this base address
  # it must be a valid URL, if you don't provide a string to src key
  # plugin will ignore this settings and uses default settings which
  # is OpenMoji emoji pack.
  src: "https://www.emojisource.com"

  # asset key is optional.
  # it will be appended to the end of src keyword to make a complete URL,
  # if you don't provide the asset value, it will be defaulted to "emoji".
  # you can also provide an empty string "" if your source doesn't have any asset path.
  asset: "/color/png"

  # final path will be  "https://www.emojisource.com/color/png" and
  # emoji images will serve from this address.
  # in case of no asset value, final path would be  "https://www.emojisource.com/color/svg/emoji"

  # MORE CONFIGURATION OPTIONS
  # all configs below are optional.

  # default emoji image extension is svg (vector file), but if your emoji source
  # images are in other formats, you can manually override default extension by using below key
  # and specify your desired extension (png, jpg, jpeg, bmp, etc).
  extension: "png"

  # you can also provide default inline css properties for emoji images with img_attrs
  # key, keep in mind that the keys must be valid css properties like padding, margin
  # height, width, etc.
  # below is a the default settings.
  img_attrs:
    class: "emoji"
    height: "20"
    width: "20"

How it works

For all sites emoji images are served from a GitHub.com CDN, with a base URL of https://cdn.jsdelivr.net/gh/azadeh-afzar/OpenMoji-Jekyll-Plugin@latest and asset path of /images/color/svg, which results in emoji image URLs like https://cdn.jsdelivr.net/gh/azadeh-afzar/OpenMoji-Jekyll-Plugin@latest/images/color/svg/1f604.svg.

However you can alter the default path in _config.yml to serve from external sources.

Notes

  • Your external image source must be compatible with this plugin in order to show emojis correctly, for example:
    • emoji files names should be lowercase unicode strings, so that this emoji 😄 image file must be: 1f604 followed by its extension (here png), final file name would be 1f604.png

Contribution

If you want to contribute to this project, please read CONTRIBUTING.

Code of Conduct

Visit the Code of Conduct.

Roadmap

Visit the Roadmap to keep track of which features we are currently working on.

License

Licensed under the GPLv3.

Attribution

  1. All default emojis designed by OpenMoji - the open source emoji and icon project. License: CC BY-SA 4.0
  2. This project is a fork of Jemoji. License: MIT
jekyll logo

Want a Jekyll website built?

Hire a Jekyll developer