I am trying to convert a jekyll site to hugo and I am missing one little thing. My blog uses the emoji plugin that converts github styled emojis ala :smile: into . I could not find a plugin or a way to write such a plugin. Am I missing something?
@bitboxer Hugo uses BlackFriday, a Go markdown converter. To my knowledge, it does not have native support for GFM/Jekyll-style emojis, but you may want to add a feature request to that repo. That said, you always have the option of adding the Unicode to your markdown files, but I can understand why that might be a PITA, especially if you already have a lot of content. As far as plugins, Hugo does not currently support them and therefore does not have an ecosystem to browse in that regard.
However, I see that it is kind of custom implementation which does not show colorized images. Is there a way to have āstandardā ones displayed within Hugo?
It might be elsewhere too. I know I ran across it in my own getting up to speed. Easy to miss and reasonable to think it would just work, if you have no history of the internals and why they are how they are. I assume thereās a speed cost to having it enabled, otherwise not sure why it wouldnāt be default on.
@RickCogley is correct; Hugoās emojify support is a utilify to make it simpler to write those Unicode characters ā but it is up to the client to present them (colour them etc.).
Hi everyone, to solve this issue of uncoloured emojis, which varies client by client, I used twemoji in my site. Thus is my blog: https://blog.utkarshverma.me
I know that this is an old thread but really there is no need for third party emoji fonts -unless of course there is a specific reason for using one of those-.
Here is a font stack for the various color emoji fonts used in different OSes:
font-family: Apple Color Emoji,Segoe UI Emoji,NotoColorEmoji,Segoe UI Symbol,Android Emoji,EmojiSymbols;
So simply set enableEmoji = true in your projectās config, use the above CSS and type your emoji heart out using the cheat sheet.
hey @alexandros, that is useful info. But if you donāt mind my asking, how do you pinpoint emoji with that font stack? For example, if I set a font for general body text, I might do:
html, body {
font-family: 'IBM Plex Mono', monospace;
}
Typically I wrap emojis within a span element that I enter directly in a markdown content file
i.e. <span class="emoji">:smile:</p> and then I assign the rule like this:
.emoji {
font-family: Apple Color Emoji,Segoe UI Emoji,NotoColorEmoji,Segoe UI Symbol,Android Emoji,EmojiSymbols;
}
HTML is perfectly valid within Markdown and also there are other CSS rules associated with the aforementioned class that are relative to the size of the emoticon and its margins.