summaryrefslogtreecommitdiff
path: root/themes/hugo-coder/exampleSite/content/posts/emoji-support.md
diff options
context:
space:
mode:
Diffstat (limited to 'themes/hugo-coder/exampleSite/content/posts/emoji-support.md')
m---------themes/hugo-coder0
-rw-r--r--themes/hugo-coder/exampleSite/content/posts/emoji-support.md46
2 files changed, 46 insertions, 0 deletions
diff --git a/themes/hugo-coder b/themes/hugo-coder
deleted file mode 160000
Subproject 55b2a150f990bc56364dba347bc9acc6aab07be
diff --git a/themes/hugo-coder/exampleSite/content/posts/emoji-support.md b/themes/hugo-coder/exampleSite/content/posts/emoji-support.md
new file mode 100644
index 0000000..f17f49a
--- /dev/null
+++ b/themes/hugo-coder/exampleSite/content/posts/emoji-support.md
@@ -0,0 +1,46 @@
1+++
2author = "Hugo Authors"
3title = "Emoji Support"
4date = "2019-03-05"
5description = "Guide to emoji usage in Hugo"
6tags = [
7 "emoji",
8]
9+++
10
11Emoji can be enabled in a Hugo project in a number of ways.
12<!--more-->
13The [`emojify`](https://gohugo.io/functions/emojify/) function can be called directly in templates or [Inline Shortcodes](https://gohugo.io/templates/shortcode-templates/#inline-shortcodes).
14
15To enable emoji globally, set `enableEmoji` to `true` in your site's [configuration](https://gohugo.io/getting-started/configuration/) and then you can type emoji shorthand codes directly in content files; e.g.
16
17<p><span class="nowrap"><span class="emojify">🙈</span> <code>:see_no_evil:</code></span> <span class="nowrap"><span class="emojify">🙉</span> <code>:hear_no_evil:</code></span> <span class="nowrap"><span class="emojify">🙊</span> <code>:speak_no_evil:</code></span></p>
18<br>
19
20The [Emoji cheat sheet](http://www.emoji-cheat-sheet.com/) is a useful reference for emoji shorthand codes.
21
22***
23
24**N.B.** The above steps enable Unicode Standard emoji characters and sequences in Hugo, however the rendering of these glyphs depends on the browser and the platform. To style the emoji you can either use a third party emoji font or a font stack; e.g.
25
26{{< highlight html >}}
27.emoji {
28 font-family: Apple Color Emoji, Segoe UI Emoji, NotoColorEmoji, Segoe UI Symbol, Android Emoji, EmojiSymbols;
29}
30{{< /highlight >}}
31
32{{< css.inline >}}
33<style>
34.emojify {
35 font-family: Apple Color Emoji, Segoe UI Emoji, NotoColorEmoji, Segoe UI Symbol, Android Emoji, EmojiSymbols;
36 font-size: 2rem;
37 vertical-align: middle;
38}
39@media screen and (max-width:650px) {
40 .nowrap {
41 display: block;
42 margin: 25px 0;
43 }
44}
45</style>
46{{< /css.inline >}}