https://github.com/unasuke/middleman-somemoji
https://github.com/unasuke/middleman-somemoji
Last synced: 8 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/unasuke/middleman-somemoji
- Owner: unasuke
- License: mit
- Created: 2017-05-16T17:31:00.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2021-10-28T15:34:49.000Z (over 4 years ago)
- Last Synced: 2025-07-28T03:47:22.610Z (11 months ago)
- Language: Ruby
- Size: 37.1 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# middleman-somemoji
[](https://circleci.com/gh/unasuke/middleman-somemoji/tree/master)
[](https://github.com/unasuke/middleman-somemoji/actions/workflows/ruby.yml)
middleman-somemoji is a emoji extension for Middleman.
Choose emoji provider and convert emoji shorthand (e.g. `:heart:`) to `
` tag using somemoji gem.
## usage
### 1. bundle install
```ruby
# Gemfile
source 'https://rubygems.org'
gem 'middleman', '>= 4.0.0'
gem 'middleman-somemoji'
```
and run `bundle install`
### 2. download emoji images
Download emoji images to your middleman images directory using somemoji gem.
```shell
# 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](https://github.com/r7kamura/somemoji/blob/master/README.md)
### 3. activate somemoji extension and setting it
```ruby
# your middleman config.rb
activate :somemoji,
provider: 'twemoji',
emojis_dir: '/images/emoji'
```
:warning: __note__ :warning:
If you using `asset_hash` extension, currentry disable it in emoji images directory please :pray:
```ruby
# for example
activate :asset_hash, ignore: 'images/twemoji'
```
### 4. write emoji shorthand
examples...
```markdown
# my markdown document
I'm happy :lauging:
## but
So sorry... :bow:
```
```slim
h1 my slim document
div.some-class
p
| :eyes:
small
| :+1:
```
See also [Emoji cheat sheet for GitHub, Basecamp and other services](https://www.webpagefx.com/tools/emoji-cheat-sheet/)
### 5. build middleman site!
```shell
$ bundle exec middleman build
```
## Development
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](https://rubygems.org).
## Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/unasuke/middleman-somemoji.
## License
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
## Reference
- [r7kamura/somemoji: A grand unified emoji mapper for some emoji providers.](https://github.com/r7kamura/somemoji)