mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2025-04-27 08:58:30 -04:00
better implementation of hugo mods for twemojis 📦
This commit is contained in:
parent
4f71dd509b
commit
3224d9b072
@ -40,8 +40,8 @@ disableAliases = true
|
||||
path = "github.com/twitter/twemoji"
|
||||
disabled = false
|
||||
[[module.imports.mounts]]
|
||||
source = "v/12.1.5"
|
||||
target = "static/vendor/emoji"
|
||||
source = "assets/svg"
|
||||
target = "static/vendor/emoji/svg"
|
||||
|
||||
[author]
|
||||
name = "Jake Jarvis"
|
||||
|
2
go.mod
2
go.mod
@ -2,4 +2,4 @@ module github.com/jakejarvis/jarv.is
|
||||
|
||||
go 1.14
|
||||
|
||||
require github.com/twitter/twemoji v12.0.5-0.20200128193524-d998789b5d5e+incompatible // indirect
|
||||
require github.com/twitter/twemoji v12.1.5+incompatible // indirect
|
||||
|
3
go.sum
3
go.sum
@ -1,5 +1,2 @@
|
||||
github.com/twitter/twemoji v1.4.2 h1:AOD6NuL0n39nxziFJRfYEhh3s5V9uxLVHLEoUNhrRf0=
|
||||
github.com/twitter/twemoji v12.0.5-0.20200128193524-d998789b5d5e+incompatible h1:YgZzWr28GaMPQvDSDhD7SHfEYGxiYsvJmu1rCOGJttA=
|
||||
github.com/twitter/twemoji v12.0.5-0.20200128193524-d998789b5d5e+incompatible/go.mod h1:06L6PdKuWDx/Yh6s4B7yGkAeBmWZzbFZgfNnWlJPPYM=
|
||||
github.com/twitter/twemoji v12.1.5+incompatible h1:q2DZm6LI6aF46VSUhYsrWDd7IeBV1H/2uTjGXDhVyEA=
|
||||
github.com/twitter/twemoji v12.1.5+incompatible/go.mod h1:06L6PdKuWDx/Yh6s4B7yGkAeBmWZzbFZgfNnWlJPPYM=
|
||||
|
@ -1,2 +1,2 @@
|
||||
<script src="{{ "/vendor/emoji/twemoji.min.js" | absURL }}"></script>
|
||||
<script src="{{ "/vendor/emoji/emoji.min.js" | absURL }}"></script>
|
||||
<script>twemoji.parse(document.body,{{ dict "base" ("/" | absURL) "folder" "vendor/emoji/svg" "ext" ".svg" | jsonify | safeJS }})</script>
|
||||
|
@ -146,6 +146,10 @@
|
||||
from = "/twemoji/*"
|
||||
to = "/vendor/emoji/:splat"
|
||||
status = 301
|
||||
[[redirects]]
|
||||
from = "/vendor/emoji/twemoji.min.js"
|
||||
to = "/vendor/emoji/emoji.min.js"
|
||||
status = 301
|
||||
|
||||
# More miscellaneous mirrors:
|
||||
[[redirects]]
|
||||
|
@ -16,12 +16,11 @@
|
||||
"scripts": {
|
||||
"clean": "rimraf public/ resources/ builds/",
|
||||
"build": "run-s clean hugo optimize",
|
||||
"build:preview": "run-s clean hugo:dev optimize:junk",
|
||||
"build:preview": "run-s clean hugo:dev",
|
||||
"hugo": "hugo --gc --cleanDestinationDir --verbose",
|
||||
"hugo:dev": "hugo --environment development --baseURL ${DEPLOY_PRIME_URL:-/} --buildDrafts --buildFuture --gc --cleanDestinationDir --verbose",
|
||||
"start": "hugo server --disableFastRender --buildDrafts --buildFuture --port 1337 --bind 0.0.0.0 --verbose",
|
||||
"optimize": "run-s optimize:**",
|
||||
"optimize:junk": "rimraf public/vendor/emoji/{*.html,72x72} public/*/amp.html",
|
||||
"optimize:html": "html-minifier --html5 --collapse-whitespace --collapse-boolean-attributes --preserve-line-breaks --minify-css --file-ext html --input-dir public --output-dir public **/*.html",
|
||||
"optimize:img": "find ./public -type d ! -path './public/vendor*' | xargs -n1 -P8 -I{} imagemin {}/* --plugin=jpegoptim --plugin.jpegoptim.progressive --plugin.jpegoptim.stripAll --plugin=pngquant --plugin.pngquant.speed=5 --plugin.pngquant.strip --plugin=optipng --plugin.optipng.optimizationLevel=2 --plugin=gifsicle --plugin=svgo --out-dir={}",
|
||||
"lint": "run-s lint:**",
|
||||
|
2
static/vendor/emoji/emoji.min.js
vendored
Normal file
2
static/vendor/emoji/emoji.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
@ -971,9 +971,9 @@ cli-cursor@^3.1.0:
|
||||
restore-cursor "^3.1.0"
|
||||
|
||||
cli-spinners@^2.2.0:
|
||||
version "2.2.0"
|
||||
resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-2.2.0.tgz#e8b988d9206c692302d8ee834e7a85c0144d8f77"
|
||||
integrity sha512-tgU3fKwzYjiLEQgPMD9Jt+JjHVL9kW93FiIMX/l7rivvOD4/LL0Mf7gda3+4U2KJBloybwgj5KEoQgGRioMiKQ==
|
||||
version "2.3.0"
|
||||
resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-2.3.0.tgz#0632239a4b5aa4c958610142c34bb7a651fc8df5"
|
||||
integrity sha512-Xs2Hf2nzrvJMFKimOR7YR0QwZ8fc0u98kdtwN1eNAZzNQgH3vK2pXzff6GJtKh7S5hoJ87ECiAiZFS2fb5Ii2w==
|
||||
|
||||
cli-truncate@^0.2.1:
|
||||
version "0.2.1"
|
||||
|
Loading…
x
Reference in New Issue
Block a user