Emojis not rendering with enableEmoji = true

I’ve set enableEmoji = true in my config:

baseURL = "/"
languageCode = "en-GB"
title = "my site"
theme = "gohugo-theme-mysite"
contentDir = "content"
[permalinks]
  blog = "blog/:year/:month/:day/:slug"

# enableGitInfo = true # N.B. .GitInfo does not currently function with submodule content directories
enableEmoji = true

[module]
  # uncomment line below for temporary local development of module
  # replacements = "github.com/lotuslabsuk/gohugo-theme-lotuslabs -> themes/gohugo-theme-lotuslabs"
  [module.hugoVersion]
    extended = true
    min = "0.100.0"
  [[module.imports]]
    path = "github.com/gohugoio/hugo-mod-bootstrap-scss/v5"
    disable = false

[markup]
  defaultMarkdownHandler = "goldmark"
  [markup.goldmark]
    [markup.goldmark.renderer]
      unsafe = true # https://jdhao.github.io/2019/12/29/hugo_html_not_shown/

But emojis e.g. :heart: :heart: do not render in my content. I just see the un-rendered text, :heart:

I can just paste an emoji in the markdown and it renders fine. But I’d like to be able to use the short hand syntax.

I’m using Hugo extended

Can’t figure out what the issue is.

You’ve placed enableEmoji = true within the permalinks table. It needs to go in the root table.

https://toml.io/en/v1.0.0#table

The top-level table, also called the root table, starts at the beginning of the document and ends just before the first table header (or EOF).

2 Likes

Thank you!!! I can’t believe I didn’t notice that!

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.