octopress-gemoji provides "gemoji" tag to use emoji in Octopress.
📝
There is a similar plugin, jekyll-emoji, which provides filter for emoji description (such :smile:
).
-
Copy
plugins/gemoji.rb
to yourplugins
directory, andsass/plugins/_gemoji.scss
to yoursass/plugins/
directory. -
Add a following line to
sass/plugins/_plugins.scss
:@import "gemoji";
-
Add a line like
emoji_dir: /images/emoji
to your_config.yml
-
Add
gem 'gemoji'
to Gemfile and dobundle install
.
Done!
📝 _egmoji.scss
has settings for emoji
class which is used by jekyll-emoji, too.
emoji_dir
and gemoji
are also used by jekyll-emoji.
If you already have these settings for jekyll-emoji, you don't need to add them.
Use tag gemoji
+ emoji names
:
{% gemoji smile %}
will be 😄.
See EMOJI CHEAT SHEET for more emojis.
From gemoji 2.X, it changed image directory structures and names.
To update octopress-gemoji for it, you need to:
- Update octopress-gemoji to the latest version.
- Remove source/images/emoji/ directory from your Octopress.
- Do at least 1 additional
rake generate
before the finalrake generate
for publishing. (This is needed to copy pictures from gemoji to Octopress images directory.)