1
mirror of https://github.com/jakejarvis/hugo-mod-twemoji.git synced 2025-06-27 17:55:40 -04:00

2 Commits

5 changed files with 17 additions and 16 deletions

View File

@ -10,7 +10,7 @@ jobs:
test: test:
runs-on: ubuntu-latest runs-on: ubuntu-latest
env: env:
HUGO_VERSION: 0.68.3 HUGO_VERSION: 0.83.1
HUGO_EXTENDED: true HUGO_EXTENDED: true
steps: steps:
- name: Checkout local copy of module - name: Checkout local copy of module
@ -19,7 +19,7 @@ jobs:
path: module path: module
fetch-depth: 1 fetch-depth: 1
- name: Install Go 1.13.x - name: Install Go 1.13.x
uses: actions/setup-go@v2-beta uses: actions/setup-go@v2
with: with:
go-version: 1.13.x go-version: 1.13.x
- name: Install Hugo - name: Install Hugo
@ -30,16 +30,17 @@ jobs:
tar xf hugo_${HUGO_EXTENDED:+extended_}${HUGO_VERSION}_Linux-64bit.tar.gz tar xf hugo_${HUGO_EXTENDED:+extended_}${HUGO_VERSION}_Linux-64bit.tar.gz
chmod +x ./hugo chmod +x ./hugo
./hugo version ./hugo version
- name: Checkout gohugoio/hugoDocs - name: Checkout gohugoio/hugoBasicExample
uses: actions/checkout@v2 uses: actions/checkout@v2
with: with:
repository: gohugoio/hugoDocs repository: gohugoio/hugoBasicExample
ref: 20d77860b2a992b4917af75a657419b19baafa43 ref: 00188bc80985f84f6ee85e41f533dd4a19cae169
path: docs path: example
fetch-depth: 1 fetch-depth: 1
- name: Install local module & add to config.toml - name: Install local module & add to config.toml
run: | run: |
cd docs cd example
$GITHUB_WORKSPACE/hugo mod init github.com/gohugoio/hugoBasicExample
$GITHUB_WORKSPACE/hugo mod get github.com/jakejarvis/hugo-mod-twemoji $GITHUB_WORKSPACE/hugo mod get github.com/jakejarvis/hugo-mod-twemoji
echo -e "[[module.imports]]\n path = \"github.com/jakejarvis/hugo-mod-twemoji\"" >> config.toml echo -e "[[module.imports]]\n path = \"github.com/jakejarvis/hugo-mod-twemoji\"" >> config.toml
echo "replace github.com/jakejarvis/hugo-mod-twemoji => /home/runner/work/hugo-mod-twemoji/hugo-mod-twemoji/module" >> go.mod echo "replace github.com/jakejarvis/hugo-mod-twemoji => /home/runner/work/hugo-mod-twemoji/hugo-mod-twemoji/module" >> go.mod
@ -47,10 +48,10 @@ jobs:
$GITHUB_WORKSPACE/hugo mod graph $GITHUB_WORKSPACE/hugo mod graph
- name: Build site - name: Build site
run: | run: |
./hugo --source docs/ --verbose ./hugo --source example/ --verbose
- name: Are 🌈s imaginary??? (png) - name: Are 🌈s imaginary??? (png)
run: | run: |
test -f ./docs/public/twemoji/png/1f308.png test -f ./example/public/twemoji/png/1f308.png
- name: Does true 💓 even exist?!?!??! (svg) - name: Does true 💓 even exist?!?!??! (svg)
run: | run: |
test -f ./docs/public/twemoji/svg/1f493.svg test -f ./example/public/twemoji/svg/1f493.svg

View File

@ -2,7 +2,7 @@
![](https://user-images.githubusercontent.com/1703673/78717950-64b01680-78ef-11ea-9010-1055e014abbf.png) ![](https://user-images.githubusercontent.com/1703673/78717950-64b01680-78ef-11ea-9010-1055e014abbf.png)
[**Twemoji**](https://twemoji.twitter.com/) (Twitter Emoji) is an open-source library of every Unicode emoji ([all 3,245 of them!](https://emojipedia.org/twitter/)) uniquely redesigned in both SVG and PNG formats. It also provides a script to swap out system-native emojis for these graphics to achieve a uniform appearance across all browsers and platforms. 🙌 [**Twemoji**](https://twemoji.twitter.com/) (Twitter Emoji) is an open-source library of every Unicode emoji ([all 3,500+ of them!](https://emojipedia.org/twitter/)) uniquely redesigned in both SVG and PNG formats. It also provides a script to swap out system-native emojis for these graphics to achieve a uniform appearance across all browsers and platforms. 🙌
This [Hugo Module](https://gohugo.io/hugo-modules/) can be used to import the Twemoji graphics and scripts locally into your Hugo project, rather than making external calls to Twitter's CDN for each individual icon. This [Hugo Module](https://gohugo.io/hugo-modules/) can be used to import the Twemoji graphics and scripts locally into your Hugo project, rather than making external calls to Twitter's CDN for each individual icon.
@ -16,7 +16,7 @@ Give the [Hugo Modules documentation](https://gohugo.io/hugo-modules/) a read to
path = "github.com/jakejarvis/hugo-mod-twemoji" path = "github.com/jakejarvis/hugo-mod-twemoji"
``` ```
The graphics will be mounted in `static/twemoji/svg` and `static/twemoji/png`, and the [minified script](https://github.com/twitter/twemoji/blob/gh-pages/v/12.1.6/twemoji.min.js) in `static/twemoji/js`. The graphics will be mounted in `static/twemoji/svg` and `static/twemoji/png`, and the [minified script](https://github.com/twitter/twemoji/blob/gh-pages/v/13.0.1/twemoji.min.js) in `static/twemoji/js`.
Before you start, you'll probably want to [add Twitter's recommended CSS](https://github.com/twitter/twemoji#inline-styles) to your stylesheet to make sure the Twemojis match the size and alignment of the surrounding text — otherwise they'll be humongous: Before you start, you'll probably want to [add Twitter's recommended CSS](https://github.com/twitter/twemoji#inline-styles) to your stylesheet to make sure the Twemojis match the size and alignment of the surrounding text — otherwise they'll be humongous:

File diff suppressed because one or more lines are too long

2
go.mod
View File

@ -2,4 +2,4 @@ module github.com/jakejarvis/hugo-mod-twemoji
go 1.13 go 1.13
require github.com/twitter/twemoji v13.0.0+incompatible // indirect require github.com/twitter/twemoji v13.1.0+incompatible // indirect

4
go.sum
View File

@ -1,2 +1,2 @@
github.com/twitter/twemoji v13.0.0+incompatible h1:zhjK0965GpFVjOsOpSfg2+Q59GjlWbOlLYvoMGkihqk= github.com/twitter/twemoji v13.1.0+incompatible h1:zuIDFhqQo+lyFKf764PZ2tvHRFg+KFwq5tyAzW9vJl4=
github.com/twitter/twemoji v13.0.0+incompatible/go.mod h1:06L6PdKuWDx/Yh6s4B7yGkAeBmWZzbFZgfNnWlJPPYM= github.com/twitter/twemoji v13.1.0+incompatible/go.mod h1:06L6PdKuWDx/Yh6s4B7yGkAeBmWZzbFZgfNnWlJPPYM=