You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My blog isn't located at the root of my webspace but in a subdirectory. So I've set the baseurl accordingly in my _config.yml.
After installing your plugin and trying to use emoji from a local directory instead of including them from GitHub I've noticed that the plugin correctly found the image files in the local directory but generated the wrong URL for the img-tags: The baseurl-part of the URL was missing.
Adding the baseurl to emoji-images-path didn't work either as the look up of the local image files failed that way.
As a start here's my quick&dirty patch:
diff --git a/_plugins/emoji_for_jekyll.rb b/_plugins/emoji_for_jekyll.rb
index 39eb05d..1d0f04b 100644
--- a/_plugins/emoji_for_jekyll.rb+++ b/_plugins/emoji_for_jekyll.rb@@ -38,7 +38,7 @@ module EmojiForJekyll
Dir.foreach(images_dir) do |image_filename|
if /^(?<tag>.*)\.(?:svg|png|jpg|jpeg|gif)/ =~ image_filename
@master_whitelist << tag
- @images_path[tag] = File.join("/", images_path, image_filename)+ @images_path[tag] = File.join("/", site.config["baseurl"], images_path, image_filename)
end
end
This solved the problem for me but obviously needs some additional checking if baseurl exists at all.
Sorry for not just providing a merge request with a final solution, but I don't really know Ruby and just don't want to deliver a botched C++-style solution. 😉
The text was updated successfully, but these errors were encountered:
My blog isn't located at the root of my webspace but in a subdirectory. So I've set the
baseurl
accordingly in my_config.yml
.After installing your plugin and trying to use emoji from a local directory instead of including them from GitHub I've noticed that the plugin correctly found the image files in the local directory but generated the wrong URL for the img-tags: The
baseurl
-part of the URL was missing.Adding the baseurl to
emoji-images-path
didn't work either as the look up of the local image files failed that way.As a start here's my quick&dirty patch:
This solved the problem for me but obviously needs some additional checking if baseurl exists at all.
Sorry for not just providing a merge request with a final solution, but I don't really know Ruby and just don't want to deliver a botched C++-style solution. 😉
The text was updated successfully, but these errors were encountered: