Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve README, add Sass file #1

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 34 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,43 +1,54 @@
# twa for Jekyll

This is a Jekyll plugin for Twitter Emoji.
It is based heavily* on the work of
## About

[@ellekasai](https://github.com/ellekasai)
This is a [Twitter Emoji](https://twemoji.twitter.com/) (Twemoji) plugin for Jekyll.

in the case of the css file that reference the required assets;
It is based heavily on the work of:

and
- [@ellekasai](https://github.com/ellekasai)'s Twemoji Awesome ([demo](http://ellekasai.github.io/twemoji-awesome/) / [repo](https://github.com/ellekasai/twemoji-awesome));
- [@kamalasaurus](https://github.com/kamalasaurus) who provides the Sass map from Emoji to Unicode, over on [Twemoji Possum](https://github.com/kamalasaurus/twemoji-possum);
- [@23maverick23](https://github.com/23maverick23) for the Jekyll source.

[@23maverick23](https://github.com/23maverick23)

in the case of the Jekyll source.
## Installation

You can find the css file [here](https://github.com/ellekasai/twemoji-awesome).
1. Download `twemoji-awesome.rb` and place it in the `_plugins` directory (option #1 in the Jekyll tutorial on [installing plugins](https://jekyllrb.com/docs/plugins/installation/));
2. Download either the CSS or the SCSS ([Sass](https://sass-lang.com/)) file (the Sass file is smaller!)
3. Place the file in your CSS directory (Jekyll will compile the file for you, at build time, in case you pick Sass);
4. Link the CSS file in your HTML. For example:
```html
<link rel="stylesheet" href="{{ "/assets/twemoji-awesome.css" | prepend: site.baseurl }}">
```
5. That's it!

Just place it in your css directory;

add a line like
```
<link rel="stylesheet" href="{{ "/css/twemoji-awesome.css" | prepend: site.baseurl }}">
```
and you should be good to go.
## Usage

Install: Place in the _plugins directory.
### Emoji
You can insert a Twemoji by inserting the following expression to your post:

Usage:
```
{% twa heart %}
```

{% twa twa-heart %}
Where `heart` may be replaced by another emoji besides "heart". Check the [Emoji Cheat Sheet](https://www.webfx.com/tools/emoji-cheat-sheet/) for valid emoji names. Note that underscores `_` must be replaced with hyphens `-`. So, for :stuck_out_tongue: (`:stuck_out_tongue:`), you'd use:

It will work with any formatting from the third column on the demo page for [Twemoji Awesome](http://ellekasai.github.io/twemoji-awesome/).
```
{% twa stuck-out-tongue %}
```

See notes there and use the [Emoji Cheatsheet](http://www.emoji-cheat-sheet.com/) for names.
### Size
You can also define a preset size by using `lg`, `2x`, `3x`, `4x` or `5x`.

Working example:
- http://ezmyrelda.com/site/2015/01/29/three-kinds-of-love/
For example:
```
{% twa pizza 5x %}
```
Would render a giant pizza!

*read: essentially lifted.

Compatibility notes:
# Compatibility

Works under the 3.0.0 dev version recently released with "gem 'jekyll'" in the gemfile.

Loading