commit 7c33c7241ca905c4b53e61f5c57e8cfcdf4a88b2 Author: Jake Jarvis Date: Tue Apr 7 15:54:34 2020 -0400 initial commit 🎉 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0b63343 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +resources/ +_vendor/ diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..04f90ff --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2020-present Jake Jarvis + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..ea55db8 --- /dev/null +++ b/README.md @@ -0,0 +1,23 @@ +# hugo-mod-twemoji 📦 + +[**Twemoji**](https://twemoji.twitter.com/) (Twitter Emoji) is an open source library of over 3,000 Unicode emojis in both PNG and SVG 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. + +## Usage + +Add the module to your Hugo project's `config.toml`: + +```toml +[module] +[[module.imports]] + path = "github.com/jakejarvis/hugo-mod-twemoji" +``` + +The graphics will be mounted in `static/twemoji/png` and `static/twemoji/svg`, and the scripts in `static/twemoji/js`. + +## License + +Twemoji graphics are licensed under [Creative Commons Attribution 4.0 International](https://creativecommons.org/licenses/by/4.0/) (CC-BY-4.0) by Twitter, Inc. and other contributors. Code is licensed under the [MIT License](http://opensource.org/licenses/MIT). + +Refer to the main [Twemoji repository](https://github.com/twitter/twemoji) or [website](https://twemoji.twitter.com/) for more information. diff --git a/config.toml b/config.toml new file mode 100644 index 0000000..d98bac0 --- /dev/null +++ b/config.toml @@ -0,0 +1,15 @@ +[module] + [[module.mounts]] + source = "static" + target = "static" + [[module.imports]] + path = "github.com/twitter/twemoji" + [[module.imports.mounts]] + source = "assets/72x72" + target = "static/twemoji/png" + [[module.imports.mounts]] + source = "assets/svg" + target = "static/twemoji/svg" + [[module.imports.mounts]] + source = "scripts" + target = "static/twemoji/js" diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..fed23f7 --- /dev/null +++ b/go.mod @@ -0,0 +1,5 @@ +module github.com/jakejarvis/hugo-mod-twemoji + +go 1.13 + +require github.com/twitter/twemoji v12.1.5+incompatible // indirect diff --git a/go.sum b/go.sum new file mode 100644 index 0000000..39a2f13 --- /dev/null +++ b/go.sum @@ -0,0 +1,2 @@ +github.com/twitter/twemoji v12.1.5+incompatible h1:q2DZm6LI6aF46VSUhYsrWDd7IeBV1H/2uTjGXDhVyEA= +github.com/twitter/twemoji v12.1.5+incompatible/go.mod h1:06L6PdKuWDx/Yh6s4B7yGkAeBmWZzbFZgfNnWlJPPYM=