Mike Slinn
Mike Slinn

emoji

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:

  • alignleft, right or inline (default is inline)
  • 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)

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 %}
returns 😁
{% emoji name='angry' %}
returns 😠
{% emoji emoji_and_name name='boom' %}
returns 💥 boom
{% emoji name='grin' align='left' %}
returns 😀
{% emoji name='horns' size='1em' %}
returns 😈
{% emoji list %}
returns
  • 😠
  • 💥
  • 😀
  • 😈
  • 😙
  • 😃
  • 💩
  • 😢
  • 😱
  • 😁
  • 😏
  • 💕

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