Skip to content
Permalink
Browse files

Feature/add twemoji support (#346)

* Add support for Twemoji

* Add post on Twemoji support

* Regenrate CSS files

* Fix missing backtick in twemoji-support.md

* Rename useTwemoji to enableTwemoji

* Move Twemoji script tag into head tag

* Fix markdown link sytnax in twemoji-support

* Fix typo in Twemoji Support post
  • Loading branch information
latiif committed Jun 1, 2020
1 parent 9d1ba9d commit 3d7b39d2b49634f3ee45bf0de3c1ce6ca1b33571
@@ -210,3 +210,10 @@ figure {
.fas {
font-weight: 900;
}

img.emoji {
height: 1em;
width: 1em;
margin: 0 .05em 0 .1em;
vertical-align: -0.1em;
}
@@ -46,6 +46,9 @@ disqusShortname = "yourdiscussshortname"
# Series see also post count
maxSeeAlsoItems = 5

# Enable Twemoji
enableTwemoji = true

# Custom CSS
custom_css = []

@@ -0,0 +1,23 @@
+++
date = "2020-05-25"
title = "Twemoji Support 🤩"
description = "The post demonstrates Twemoji support"
series = ["Theme", "Hugo"]
+++

If you want to use Twitter's [Twemoji](https://twemoji.twitter.com/) across your website, enable it in your `config.toml`
```toml
[params]
enableTwemoji = true
```

This will not only give your website unified emojis across all platforms. It will also give you [the latest Unicode 13 emoji set](https://blog.emojipedia.org/twemoji-13-0-emoji-changelog/), such as 🧋🫕🛻🪗🪞.

# Emoji size changes with text size 🤩
## Emoji size changes with text size 🤩
### Emoji size changes with text size 🤩
#### Emoji size changes with text size 🤩
##### Emoji size changes with text size 🤩
###### Emoji size changes with text size 🤩

---
@@ -10,6 +10,10 @@
<meta name="description" content="{{ .Description | default (.Summary | default .Site.Params.description ) }}">
<meta name="keywords" content="{{ (delimit .Keywords ",") | default .Site.Params.keywords }}">

{{ if .Site.Params.enableTwemoji }}
<script src="https://twemoji.maxcdn.com/v/latest/twemoji.min.js" crossorigin="anonymous"></script>
{{ end }}

{{ template "_internal/twitter_cards.html" . }}
{{ template "_internal/opengraph.html" . }}

@@ -92,7 +96,9 @@
{{ else if eq .Site.Params.colorscheme "auto" }}
{{ $csClass = "colorscheme-auto" }}
{{ end }}
<body class="{{ $csClass }}{{ if .Site.Params.rtl }} rtl{{ end }}">
<body class="{{ $csClass }}{{ if .Site.Params.rtl }} rtl{{ end }}"
onload="{{ if .Site.Params.enableTwemoji }} twemoji.parse(document.body); {{ end }}"
>
<main class="wrapper">
{{ partial "header.html" . }}

This file was deleted.

This file was deleted.

0 comments on commit 3d7b39d

Please sign in to comment.
You can’t perform that action at this time.