1
mirror of https://github.com/jakejarvis/hugo-mod-twemoji.git synced 2025-06-27 14:25:41 -04:00

mount twemoji.min.js as an asset instead of static file, and get as resource in partial

This commit is contained in:
2020-04-13 15:48:19 -04:00
parent ede8c23576
commit cf01973921
5 changed files with 13 additions and 12 deletions

View File

@ -1,2 +1,3 @@
<script src="{{ "twemoji/js/twemoji.min.js" | absURL }}"></script>
<script>twemoji.parse(document.body,{{ dict "base" ("/twemoji/" | absURL) "folder" "svg" "ext" ".svg" | jsonify | safeJS }})</script>
{{ $twemoji := resources.Get "js/twemoji.min.js" }}
<script src="{{ $twemoji.Permalink }}"></script>
<script>twemoji.parse(document.body,{{ dict "base" ("twemoji/" | absURL) "folder" "svg" "ext" ".svg" | jsonify | safeJS }})</script>