getnikola / nikola

A static website and blog generator
https://getnikola.com/
MIT License
2.62k stars 448 forks source link

Support emoji emoticons... #926

Closed damianavila closed 10 years ago

damianavila commented 10 years ago

Since a lot of users are blogging with Nikola, and this lot of users wants to express a lot of emotions... we can help them supporting emoji :bowtie::stuck_out_tongue_closed_eyes::neckbeard:

We have emojify.js, so it will be easy to integrate... thoughts?

If I have a positive feedback, I will probably do it the next week (or maybe at the weekend... or tonight :laughing:).

Kwpolska commented 10 years ago

emojify.js

We should implement it in Python, in Nikola core. Doing it in JS, on the client side, will create an ugly transition from text to emoji, and may break stuff in some places. We could compile the LESS and steal the emoticons list from the JS, write an implementation in Python, and distribute that (complete with conf.py option #92)

da2x commented 10 years ago

Doing it in JS would not work in the RSS feed.

Since emojis depend on the fonts installed, they are not a clear way of communication. A happy emoji to an iOS user may convey a different meaning to an Android user. Pile of poo is happy on iOS but sad on Windows 8.1.

Kwpolska commented 10 years ago

By emoji, @damianavila meant the CampFire/GitHub emoji set. Which are implemented in images, not codepoints alongside fancy fonts.

ralsina commented 10 years ago

This looks like a fun project. If noone else wants it, I call dibs.

damianavila commented 10 years ago

I have no time to work on this now, but I really like it to have... so it yours! :wink: :wink: :wink:

Kwpolska commented 10 years ago

Perfect! Have fun re-implementing emojify.js.

Kwpolska commented 10 years ago

PS. Where are those emoticons going to be hosted? Will we:

(a) abuse the GitHub Pages of emojify.js; (b) abuse the GitHub CDN; (c) abuse emoji-cheat-sheet.com’s servers; (d) abuse Campfire’s/37signals’ servers; (e) host them on GetNikola.com; or (f) have the users host it themselves?

For (d) and (e), it’s 5644 kbytes in 872 files.

ralsina commented 10 years ago

I'll check if someone is offering it as sort-of-a CDN, if not, then the user's site gets them.

Kwpolska commented 10 years ago

There is an official Jekyll plugin that uses GitHub’s resources. This plugin is used by GitHub Pages, but it can also be used on standalone pages deployed somewhere else. Which means GitHub probably won’t mind if we used them, too.

https://github.com/jekyll/jemoji

So — the task is now pretty much “re-implement that Jekyll plugin in Nikola”.

ralsina commented 10 years ago

I accidentally committed a few MB of emojis that I later deleted. Is it possible to remove all that useless cruft from the repo? It should not matter but...

Kwpolska commented 10 years ago

You can do it by rewriting history. Done that. In order to save local disk space, run:

git pull --ff-only origin master
git reflog expire --expire=now --all
git gc --aggressive --prune=now

In case git pull fails, you would need to checkout ded3055, remove the master branch and checkout -b master; and then run reflog and gc.

Kwpolska commented 10 years ago

Oh, and for the record, I ran git rebase -i HEAD~5, made the “oops” commit fixup, saved and finally fired git push --force origin master.

damianavila commented 10 years ago

git push --force origin master. :fearful: ... jajaja