I’ve seen a particular Hugo theme called hello-friend which I liked and choose to start with it. However, in a post I thought of adding an emoji (a simple 😄). But it didn’t work, and the reason is that the template did not use a parsing for them. However Hugo supports them, and I only hade to change this in one place in the template to make it work. So in themes/hello-friend/layouts/_default/single.html change :

    <h1 class="post-title">{{ .Title | markdownify }}</h1>

to

    <h1 class="post-title">{{ .Title | markdownify | emojify }}</h1>

and that will show the emoji in the title when you have the particular post selected.

To do the same for the content of the post you need to change the following similarly: from

      {{ .Content }}

to

      {{ .Content | emojify }}

However you will notice that when you list your posts the emoji is not there… the reason is that you need to change another template file which takes care of listing posts in one page. Find the file list.html in the same directory as previously, and find the post-content class.

then add the | emojify where you need this to happen.

for title,

        <h1 class="post-title"><a href="{{ .Permalink }}">{{ .Title | markdownify | emojify }}</a></h1>

and content,

        <div class="post-content">
          {{ with .Description }}
            {{ . | markdownify | emojify }}
            {{ else }}
            {{ if .Truncated }}
              {{ .Summary | emojify }}
            {{ end }}
          {{ end }}
        </div>

For everything to work of course, enableEmoji = true needs to be added in config.toml (or hugo.toml)