Files
hugo/content/functions/emojify.md
T
2017-03-27 14:33:35 -05:00

1.1 KiB

title, linktitle, description, godocref, date, publishdate, lastmod, categories, tags, ns, signature, workson, hugoversion, relatedfuncs, deprecated
title linktitle description godocref date publishdate lastmod categories tags ns signature workson hugoversion relatedfuncs deprecated
emojify Runs a string through the Emoji emoticons processor. 2017-02-01 2017-02-01 2017-02-01
functions
strings
emojis
false

emoji runs a passed string through the Emoji emoticons processor. The result will be declared as "safe" to prevent Go templates from filtering it as unsafe HTML.

See the Emoji cheat sheet for available emoticons.

The emojify function can be called in your templates but not directly in your content files by default. To add emojis directly into content without further templating or shortcode considerations, set enableEmoji to true in your site's configuration.

Example

When enabled, you can write emoji shorthand directly into your content files; e.g. I :heart: Hugo!:

I ❤️ Hugo!