Closed s10wen closed 11 years ago
Have you got the gemoji gem installed?
gem install gemoji
or add gem 'gemoji'
to your gemfile.
Yes, did both those, that got rid of the LoadError cheers, but I'm still seeing :smiley:
rather than the icon graphic when I do a rake generate
, rake preview
.
Have you applied the filter to the area you wish to be parsed? e.g. {{ content | emojify }}
Do you need to do {{ content | emojify }}
as well as add :smiley:
? If so, where do you add {{ content | emojify }}
please?
I just took a look at the Ocotopress source. I'm guessing it's this file to add emoji to the posts: https://github.com/imathis/octopress/blob/master/.themes/classic/source/_includes/article.html
And this file to add emoji to the pages: https://github.com/imathis/octopress/blob/master/.themes/classic/source/_layouts/page.html
Now getting Liquid Exception: No such file or directory - ./images/emoji in post
Guess it's looking in the wrong place?
In Finder, I can see them at images/emoji
and source/images/emoji
Give me a second. I'm going to have to install Octopress to figure this one out.
Lol, don't have to do that mate! I'm almost there, with {{ content | excerpt }}
can you like do multiple e.g. {{ content | excerpt | emojify }}
?
Just got it working with pages! :dancer:
Oh just got Octopress installed haha. So it's working now? Great :smile:. Yep {{ content | excerpt | emojify }}
should be fine.
So close! Changed {{ content }}
to {{ content | emojify }}
in the page.html and it's all cool, but when I do the same thing in the article.html I get Liquid Exception: No such file or directory - ./images/emoji in post
I figured out the issue but fixing it is proving tricky.
K, ta for helping out, is there a work around for the time being?
No work around I'm afraid but I've just updated the plugin for you. You'll need to replace the plugin with the new version and place emoji_dir: images/emoji
in your _config.yml
file. I've confirmed this works with Octopress.
Awesome, seems to work ok!
Just wondering... the images are 64x64. Previously in the HTML there was a height of 20, but it was still pulling in the 64x64 images, wondering if it's better to serve 20x20 images?
Great, glad to hear it works now.
It wasn't good to hardcode the image size into the plugin, so the images are now shown at their native size. Each image has an emoji
class so a little CSS like .emoji { width: 20px; height: 20px; }
will allow you to choose the size that suits your site. I suppose I could have made it a config option to be placed in your _config.yml
. Wasn't sure what people would prefer though.
Just wondering if it's possible to serve 20x20 images, rather than scaling them down?
The gemoji gem (https://github.com/github/gemoji) supplies the images in 64x64px. If you want 20x20px you could just batch process the images in your images/emoji
dir.
Cool, thanks for the help :v:
Wrote up a blog on how I got it working: http://simonowendesign.github.com/blog/2013/03/23/adding-emoticons-to-octopress/
Trying to get this up and running with Octopress.
Went over the readme, did a
rake generate
, thenrake preview
, but getting the following error: `require': cannot load such file -- gemoji (LoadError)Any ideas please?