Published 2020-10-03.
Last modified 2023-07-07.
Time to read: 1 minutes.
This page is part of the
jekyll_plugins
collection, categorized under Jekyll.
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
,right
orinline
(default isinline
)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
)
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
grin
horns
kiss
open
poop
sad
scream
smiley
smirk
two_hearts
Usage
{% emoji %}
{% emoji name='angry' %}
{% emoji emoji_and_name name='boom' %}
boom
{% emoji name='grin' align='left' %}
{% emoji name='horns' size='1em' %}
{% emoji list %}
- 😠
- 💥
- 😀
- 😈
- 😙
- 😃
- 💩
- 😢
- 😱
- 😁
- 😏
- 💕
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