mirror of
https://github.com/foo-dogsquared/hugo-theme-more-contentful.git
synced 2025-02-01 04:57:59 +00:00
186 lines
7.1 KiB
HTML
186 lines
7.1 KiB
HTML
|
<!DOCTYPE html>
|
|||
|
<html lang="en-us"><title>Emoji Support | Contentful</title>
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
<link rel="stylesheet" href="https://foo-dogsquared.github.io/hugo-theme-more-contentful/css/main.min.e06bc29e2cb00a8f461bfefc0ea9543b9bf61688266d3ca51fcb4d2121242b0a.css" /><meta name="generator" content="Hugo 0.76.0" />
|
|||
|
<meta charset="utf-8">
|
|||
|
<meta name="author" content="John Doe" />
|
|||
|
|
|||
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|||
|
<meta name="referrer" content="no-referrer" />
|
|||
|
<meta name="description" content="Emoji can be enabled in a Hugo project in a number of ways." /><meta name="twitter:card" content="summary"/>
|
|||
|
<meta name="twitter:title" content="Emoji Support"/>
|
|||
|
<meta name="twitter:description" content="Emoji can be enabled in a Hugo project in a number of ways."/>
|
|||
|
<meta property="og:title" content="Emoji Support" />
|
|||
|
<meta property="og:description" content="Emoji can be enabled in a Hugo project in a number of ways." />
|
|||
|
<meta property="og:type" content="article" />
|
|||
|
<meta property="og:url" content="https://foo-dogsquared.github.io/hugo-theme-more-contentful/articles/emoji-support/" />
|
|||
|
<meta property="article:published_time" content="2019-08-28T12:11:22+08:00" />
|
|||
|
<meta property="article:modified_time" content="2020-11-02T23:58:07+08:00" />
|
|||
|
<link rel="canonical" type="text/html" href="https://foo-dogsquared.github.io/hugo-theme-more-contentful/articles/emoji-support/" />
|
|||
|
|
|||
|
<script>
|
|||
|
let theme = window.localStorage.getItem('theme');
|
|||
|
if (theme) {
|
|||
|
document.documentElement.dataset.theme = theme;
|
|||
|
}
|
|||
|
</script>
|
|||
|
|
|||
|
<body>
|
|||
|
<div class="site__theme-btn" aria-label="Theme toggle">
|
|||
|
|
|||
|
<svg>
|
|||
|
<use href="https://foo-dogsquared.github.io/hugo-theme-more-contentful/icons/generic/color-swatch.svg#color-swatch"></use>
|
|||
|
</svg>
|
|||
|
|
|||
|
<div class="site__theme-dropdown">
|
|||
|
<div class="site__theme-item" >Default Dark (default)</div>
|
|||
|
<div class="site__theme-item" data-theme="Dracula">Dracula</div>
|
|||
|
<div class="site__theme-item" data-theme="Nord">Nord</div>
|
|||
|
</div>
|
|||
|
</svg>
|
|||
|
</div>
|
|||
|
<script defer>
|
|||
|
const themeDropdown = document.querySelector('.site__theme-btn');
|
|||
|
themeDropdown.addEventListener('click', (event) => {
|
|||
|
const { target } = event;
|
|||
|
if (target.classList.contains("site__theme-item")) {
|
|||
|
if (target.dataset.theme) {
|
|||
|
theme = target.dataset.theme;
|
|||
|
window.localStorage.setItem("theme", theme);
|
|||
|
document.documentElement.dataset.theme = theme;
|
|||
|
} else {
|
|||
|
window.localStorage.removeItem("theme");
|
|||
|
delete document.documentElement.dataset.theme;
|
|||
|
}
|
|||
|
}
|
|||
|
});
|
|||
|
</script><nav aria-label="Primary navigation">
|
|||
|
<a class="site__title" href="https://foo-dogsquared.github.io/hugo-theme-more-contentful">Contentful</a>
|
|||
|
<div class="list site__links">
|
|||
|
|
|||
|
<a href="https://foo-dogsquared.github.io/hugo-theme-more-contentful/about/">About</a>
|
|||
|
<a href="https://foo-dogsquared.github.io/hugo-theme-more-contentful/categories/">Categories</a>
|
|||
|
<a href="https://foo-dogsquared.github.io/hugo-theme-more-contentful/recipes/">Recipes</a>
|
|||
|
<a href="https://foo-dogsquared.github.io/hugo-theme-more-contentful/tags/">Tags</a>
|
|||
|
|
|||
|
|
|||
|
</div>
|
|||
|
</nav>
|
|||
|
|
|||
|
|
|||
|
<article class="post--single">
|
|||
|
<header>
|
|||
|
<h1>Emoji Support</h1>
|
|||
|
</header>
|
|||
|
|
|||
|
<div class="list post__meta"><time datetime="2019-08-28 12:11:22 +0800 +0800">
|
|||
|
|
|||
|
<svg>
|
|||
|
<use href="https://foo-dogsquared.github.io/hugo-theme-more-contentful/icons/generic/calendar.svg#calendar"></use>
|
|||
|
</svg>
|
|||
|
|
|||
|
<span style="margin-left: 0.5em;">2019-08-28</span>
|
|||
|
</time>
|
|||
|
<time datetime="2020-11-02 23:58:07 +0800 +0800">
|
|||
|
|
|||
|
<svg>
|
|||
|
<use href="https://foo-dogsquared.github.io/hugo-theme-more-contentful/icons/generic/refresh.svg#refresh"></use>
|
|||
|
</svg>
|
|||
|
|
|||
|
<span style="margin-left: 0.5em;">2020-11-02</span>
|
|||
|
</time>
|
|||
|
</div>
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
<main>
|
|||
|
<p>Emoji can be enabled in a Hugo project in a number of ways.</p>
|
|||
|
<p>The <a href="https://gohugo.io/functions/emojify/"><code>emojify</code></a> function can be called directly in templates or <a href="https://gohugo.io/templates/shortcode-templates/#inline-shortcodes">Inline Shortcodes</a>.</p>
|
|||
|
<p>To enable emoji globally, set <code>enableEmoji</code> to <code>true</code> in your site’s <a href="https://gohugo.io/getting-started/configuration/">configuration</a> and then you can type emoji shorthand codes directly in content files; e.g.</p>
|
|||
|
<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>
|
|||
|
<p>The <a href="http://www.emoji-cheat-sheet.com/">Emoji cheat sheet</a> is a useful reference for emoji shorthand codes.</p>
|
|||
|
<hr>
|
|||
|
<p><strong>N.B.</strong> 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.</p>
|
|||
|
<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-html" data-lang="html">.emoji {
|
|||
|
font-family: Apple Color Emoji,Segoe UI Emoji,NotoColorEmoji,Segoe UI Symbol,Android Emoji,EmojiSymbols;
|
|||
|
}</code></pre></div>
|
|||
|
</main>
|
|||
|
|
|||
|
<hr>
|
|||
|
<div class="post__meta--single">
|
|||
|
|
|||
|
|
|||
|
|
|||
|
<p data-content-publication-date="2019-08-28 12:11:22 +0800 +0800">Created: <time datetime="2019-08-28">2019-08-28</time></p>
|
|||
|
|
|||
|
|
|||
|
<p data-content-modification-date="2020-11-02 23:58:07 +0800 +0800">Updated: <time datetime="2020-11-02">2020-11-02</time></p>
|
|||
|
|
|||
|
|
|||
|
</div>
|
|||
|
</article>
|
|||
|
|
|||
|
<hr>
|
|||
|
<footer>
|
|||
|
|
|||
|
<p><a href="#top">Back to top</a></p>
|
|||
|
|
|||
|
|
|||
|
|
|||
|
<p>Available in other languages:
|
|||
|
<span class="list site__languages">
|
|||
|
|
|||
|
<a href="/hugo-theme-more-contentful/en" hreflang="en">English</a>
|
|||
|
|
|||
|
<a href="/hugo-theme-more-contentful/tl" hreflang="tl">Tagalog</a>
|
|||
|
|
|||
|
</span>
|
|||
|
</p>
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
<ul class="list site__socials">
|
|||
|
|
|||
|
|
|||
|
|
|||
|
<li>
|
|||
|
<a class="site__social-icon" rel="me" href="https://keybase.io/foo_dogsquared" aria-label="Keybase">
|
|||
|
<svg>
|
|||
|
<use href="https://foo-dogsquared.github.io/hugo-theme-more-contentful/icons/brand/keybase.svg#keybase"></use>
|
|||
|
</svg>
|
|||
|
</a>
|
|||
|
</li><li>
|
|||
|
<a class="site__social-icon" rel="me" href="https://github.com/foo-dogsquared/" aria-label="GitHub">
|
|||
|
<svg>
|
|||
|
<use href="https://foo-dogsquared.github.io/hugo-theme-more-contentful/icons/brand/github.svg#github"></use>
|
|||
|
</svg>
|
|||
|
</a>
|
|||
|
</li><li>
|
|||
|
<a class="site__social-icon" rel="me" href="https://gitlab.com/foo-dogsquared/" aria-label="GitLab">
|
|||
|
<svg>
|
|||
|
<use href="https://foo-dogsquared.github.io/hugo-theme-more-contentful/icons/brand/gitlab.svg#gitlab"></use>
|
|||
|
</svg>
|
|||
|
</a>
|
|||
|
</li><li>
|
|||
|
<a class="site__social-icon" rel="me" href="https://twitter.com/foo_dogsquared" aria-label="Twitter">
|
|||
|
<svg>
|
|||
|
<use href="https://foo-dogsquared.github.io/hugo-theme-more-contentful/icons/brand/twitter.svg#twitter"></use>
|
|||
|
</svg>
|
|||
|
</a>
|
|||
|
</li></ul>
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
<p>© 2021 Contentful</p>
|
|||
|
</footer>
|
|||
|
|
|||
|
</body>
|
|||
|
</html>
|