Open MahdiBaghbani opened 5 years ago
This would be a great addition!
Hi @tkrunning, I write this about two months ago and seems nobody from Jemoji team is willing to respond :) so I have been re inventing the wheel for a while now and if you are interested in using emojis with custom paths and even custom extensions like .svg or .jpg, please check out this repository: https://github.com/azadeh-afzar/OpenMoji-Jekyll-Plugin
Hi Let's start with some history, actually your history ...
https://github.com/jekyll/jemoji/issues/73#issue-302901989 https://github.com/jekyll/jemoji/issues/51#issuecomment-270470974
as you see people have problems with something ridiculous called "emoji" directory appended to every thing by default and without any possible way to disable it 👎 even with this little (actually nothing) option:
I went into this problem too (are you surprised?), I googled and then read your entire issue list only to find out this problem existed for 3 years and you just said:
after this reply I understood that no maintainer gives a damn about this problem. So I moved on to fix this by myself (I had 0% knowledge of Ruby this morning, I might have 5% now).
Now lets see what causes this PAIN IN THE ASS:
filter_with_emoji function is the key function here:
filter_with_emoji uses html pipeline gem, the "emoji" directory is appended by this module file: https://github.com/jch/html-pipeline/blob/master/lib/html/pipeline/emoji_filter.rb
if you didn't/can't find your sins (yes, its your mistake) in the above code, let me guide you:
I guess when you were busy writing jemoji, you saw this line and told yourselves:
😄 YEAH NOTHING ... Exceptionally brilliant way of reading source docs, if it's optional then why should I even bother myself looking at what it does?
Let's see what's wrong:
now you see this right? if you don't provide the :asseth_path, pipeline will append "emoji" to filenames, and your brilliant way for "Customizing" as explained in README.md is useless as hell because no one can simply serve any emoji from a CDN like https://cdn.jsdelivr.net/emojione/assets/3.0/png/32/1f600.png
Now, I (some random guy with 0% Ruby knowledge) had fixed this in 1 day (the same thing you didn't give a damn for 3 years).
I have fixed it in a way that it won't break current installations, and let people get rid of "emoji" directory, by a simple new keyword called "asset":
backward compatibility ensures if user doesn't define "asset", or "emoji" at all, "emoji" directory will appended and this won't break anything (something you should know about me is that I don't like testing, so if I were you, I wouldn't trust this)
and I didn't touch README.md because I suck at English, someone else with proper grammar understanding should edit and update it.
Best, Mahdi
(Oh, I was about to forget apologizing for being a bit salty and flaming you in this message. Sorry)