Emojis Shortcode
Emojis are amazing, cute, clear, confusing, funny or whatever you connect with this topic. However - Emoticons are trendy and in Hugo there is a function available called emojify. Where you can convert a :thumbsup: to a thumb that shows up. But this can mess up really quickly if you apply this to the whole article. We will create a quick shortcode to solve this problem.
The Shortcode
Create a file called emoji.html
within your layouts/shortcodes/
-Folder. Like:
|-- layouts
| |-- shortcodes
| | |-- emoji.html
Then copy & paste the following content into it:
{{ .Get 0 | emojify }}
Usage
In your markup you can just write:
{{< emoji ":thumbsup:" >}} -> 👍
Great - quick and simple 😄
Cheatsheet
An Emoji Cheat sheet you finde here: webpagefx.com/tools/emoji-cheat-sheet/