# Best way to implement custom emoji

**URL:** <https://discourse.gohugo.io/t/best-way-to-implement-custom-emoji/17514>\
**Category:** support\
**Created:** [March 11, 2019, 2:41pm UTC](https://discourse.gohugo.io/t/best-way-to-implement-custom-emoji/17514 "2019-03-11T14:41:37Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![alcarazr](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/alcarazr/32/11576_2.png) [@alcarazr](https://discourse.gohugo.io/u/alcarazr)\
**Post date:** [December 27, 2020, 12:34pm UTC](https://discourse.gohugo.io/t/best-way-to-implement-custom-emoji/17514/4 "2020-12-27T12:34:59Z")

</div>

Hi there, sorry to reopen this after so long. I just started to use [Twemoji](https://twemoji.twitter.com) in [my website](https://rodrigoalcarazdelaosa.me/en/) thanks to [`hugo-mod-twemoji`](https://github.com/jakejarvis/hugo-mod-twemoji). [I’m looking for a way](https://discourse.gohugo.io/t/looking-for-feedback-on-a-hugo-module-for-twemojis/24625/6) to include custom SVGs in a simple way and found this, which would be great since the custom SVGs could be included just using some escape characters before and after the name of the icon (filename).

I’m wondering if the `replaceRE` function can be used in a shortcode. In my website I’m using [Wowchemy](https://wowchemy.com), which implements [this shortcode](https://github.com/wowchemy/wowchemy-hugo-modules/blob/master/wowchemy/layouts/shortcodes/icon.html) to include icons. It’d be great if I could use the technique documented here to easily include custom SVGs.

Could you share an example of using this so it can detect custom codes and replace them with SVGs? Ideally normal emojis should still be able to work, so perhaps the escape characters could be different (not `:`).

Thank you very much in advance,

Rodrigo

---

_[View the full topic](https://discourse.gohugo.io/t/best-way-to-implement-custom-emoji/17514)._
