Mike Slinn

jekyll_emoji

Published 2020-10-03. Last modified 2023-07-07.
Time to read: 1 minutes.

This page is part of the jekyll_plugins collection.

jekyll_emoji_tag defines a Jekyll tag called emoji that inserts an emoji of a given size and alignment.

Syntax

HTML or markdown
{% emoji OPTIONS %}

OPTIONS are:

  • alignleft, right or inline (default is inline)
  • class – CSS class to apply to the generated emoji
  • div – Wriap the emoji in a <div> instead of a <span>.
  • emoji_and_name – causes the name of the emoji to be output along with the image (default is false)
  • list – output all emojis (default is false)
  • name – name of emoji (defaults to smiley)
  • size – height of emoji (defaults to 3em)
  • style – Additional CSS styles for the generated emoji

list and name are mutually exclusive; only specify one of them.

If neither list nor name is specified, the smiley emoji is output.

The names of all supported emojis are:

  • angry
  • boom
  • clap
  • confounded
  • eggplant
  • grimace
  • grin
  • halo
  • horns
  • kiss
  • loudly_cry
  • notes
  • open
  • please
  • poop
  • rolling
  • sad
  • sax
  • scream
  • smiley
  • smirk
  • sunglasses
  • think
  • two_hearts
  • wink
  • worried
  • unamused
  • vulcan
  • zipper

Usage

HTML or markdown
{% emoji %}

Renders as: 😁

HTML or markdown
{% emoji name='angry' %}
renders as: 😠
HTML or markdown
{% emoji emoji_and_name name='boom' %}

Renders as: 💥 boom

HTML or markdown
{% emoji name='grin' align='left' %}

Renders as: 😀


HTML or markdown
{% emoji name='horns' size='1em' %}

Renders as: 😈

HTML or markdown
<div style="columns: 2">{% emoji emoji_and_name list %}</div>

Renders as:

  • 😠 angry
  • 💥 boom
  • 👏 clap
  • 😖 confounded
  • 🍆 eggplant
  • 😬 grimace
  • 😀 grin
  • 😇 halo
  • 😈 horns
  • 😙 kiss
  • 😭 loudly_cry
  • 🎶 notes
  • 😃 open
  • 🙏 please
  • 💩 poop
  • 🙄 rolling
  • 😢 sad
  • 🎷 sax
  • 😱 scream
  • 😁 smiley
  • 😏 smirk
  • 😎 sunglasses
  • 🤔 think
  • 💕 two_hearts
  • 😒 unamused
  • 🖖 vulcan
  • 😉 wink
  • 😟 worried
  • 🤐 zipper

See the demo for more examples.

Installation

Add the following line to your Jekyll project's Gemfile, within the jekyll_plugins group:

Gemfile
group :jekyll_plugins do 
  gem 'jekyll_emoji_tag'
end 

And then execute:

Shell
$ bundle
* indicates a required field.

Please select the following to receive Mike Slinn’s newsletter:

You can unsubscribe at any time by clicking the link in the footer of emails.

Mike Slinn uses Mailchimp as his marketing platform. By clicking below to subscribe, you acknowledge that your information will be transferred to Mailchimp for processing. Learn more about Mailchimp’s privacy practices.