Using Emoji In Posts & Themes

Emojis have been named word of the year and are seen every day in modern culture. We use them every day on our messaging apps, emails and … err blogs!

This post is about how you can enable and use them in both your Hugo themes and, in general, when writing posts.

Using Emojis in Themes

To use them within your theme, there’s a built in function which turns text in emojis. Just run your string through emojify and you should see an icon.

1
{{ emojify ":v:" }}

Results in: ✌️

For more options and a list of emojis you can use, see the cheatsheet below.

See Emoji Cheatsheet

Using Emojis in Posts

To automatically convert emoji within your blog posts when using Hugo, we can enable them within our config file. In our example, it’s called config.toml and found in the root of our project.

config.toml

1
enableEmoji = true

Once we turn this on, we can just type the tags from the cheatsheet above, and then should show as an icon.

⭐ 🐰 🌿 🎷 🍕 🌅 🚗