Choose emoji provider and convert emoji shorthand to <img> tag using somemoji gem.
MIT License
middleman-somemoji is a emoji extension for Middleman.
Choose emoji provider and convert emoji shorthand (e.g. :heart:
) to <img>
tag using somemoji gem.
# Gemfile
source 'https://rubygems.org'
gem 'middleman', '>= 4.0.0'
gem 'middleman-somemoji'
and run bundle install
Download emoji images to your middleman images directory using somemoji gem.
# in your middleman root directory (destination path is a example)
$ bundle exec somemoji extract --provider=twemoji --destination=./source/images/emoji
See also somemoji's readme → somemoji/README.md
# your middleman config.rb
activate :somemoji,
provider: 'twemoji',
emojis_dir: '/images/emoji'
⚠️ note ⚠️
If you using asset_hash
extension, currentry disable it in emoji images directory please 🙏
# for example
activate :asset_hash, ignore: 'images/twemoji'
examples...
# my markdown document
I'm happy :lauging:
## but
So sorry... :bow:
h1 my slim document
div.some-class
p
| :eyes:
small
| :+1:
See also Emoji cheat sheet for GitHub, Basecamp and other services
$ bundle exec middleman build
After checking out the repo, run bin/setup
to install dependencies. Then, run rake test
to run the tests. You can also run bin/console
for an interactive prompt that will allow you to experiment.
To install this gem onto your local machine, run bundle exec rake install
. To release a new version, update the version number in version.rb
, and then run bundle exec rake release
, which will create a git tag for the version, push git commits and tags, and push the .gem
file to rubygems.org.
Bug reports and pull requests are welcome on GitHub at https://github.com/unasuke/middleman-somemoji.
The gem is available as open source under the terms of the MIT License.