Emoji Support in Hugo
Posted on July 15, 2016 • 1 minutes • 151 words
Table of contents
Emoji can be enabled in a Hugo site in a couple of different of ways.
The <code>emojify</code> function can be called directly in templates or Inline Shortcodes .
To enable emoji globally, set enableEmoji
to true
in your site’s configuration
In this blog’s theme, the following line is simply added to the config.toml
:
1enableEmoji = true
Then you can type emoji shorthand codes directly in content files; e.g.
๐ :see_no_evil:
๐ :hear_no_evil:
๐ :speak_no_evil:
Tip 🚀
The Emoji cheat sheet hosted at https://www.webfx.com/tools/emoji-cheat-sheet is a great reference for emoji shortcodes:
![](/images/2016-07-15/emoji-shortcode-search.png)
N.B. The above steps enable Unicode Standard emoji characters and sequences in Hugo, however the rendering of these glyphs depends on the browser and the platform. To style the emoji you can either use a third party emoji font or a font stack; e.g.
1.emoji {
2font-family: Apple Color Emoji, Segoe UI Emoji, NotoColorEmoji, Segoe UI Symbol, Android Emoji, EmojiSymbols;
3}