Published 2020-10-03.
Last modified 2023-07-07.
Time to read: 1 minutes.
jekyll_plugins collection.
jekyll_emoji_tag defines a Jekyll tag called emoji
that inserts an emoji of a given size and alignment.
Syntax
{% emoji OPTIONS %}
OPTIONS are:
align–left,rightorinline(default isinline)class– CSS class to apply to the generated emojidiv– 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 isfalse)list– output all emojis (default isfalse)name– name of emoji (defaults tosmiley)size– height of emoji (defaults to3em)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:
angryboomclapconfoundedeggplantgrimacegrinhalohornskissloudly_crynotesopenpleasepooprollingsadsaxscreamsmileysmirksunglassesthinktwo_heartswinkworriedunamusedvulcanzipper
Usage
{% emoji %}
Renders as: 😁
{% emoji name='angry' %}
{% emoji emoji_and_name name='boom' %}
Renders as: 💥 boom
{% emoji align='left' name='grin'%}
Renders as: 😀
{% emoji name='horns' size='1em' %}
Renders as: 😈
<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 - 🎉
party - 🙏
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:
group :jekyll_plugins do gem 'jekyll_emoji_tag' end
And then execute:
$ bundle