2

Gravatar allows you to provide a default image for users without gravatars. Using Gravatars on a Jekyll site is easy, but Gravatar requires the default image to be visible externally.

<img src="http://www.gravatar.com/avatar/{{ page.gravatar }}?size=200&default={{ site.url | append: "/images/default.png" | cgi_escape }}"/>

I'm using site.url (and escaping it as required using the cgi_escape filter) because the image must be externally visible, but obviously during development that is not the case because my machine is not visible on the internet.

How do I test that everything is correct locally (without deploying this to production first)?

Edit: The site is hosted on github-pages

Niel de Wet
  • 7,806
  • 9
  • 63
  • 100

0 Answers0