We follow up our article on Adding author Gravatar's to your Jekyll site and show you how to get those photo’s showing up in Google search results.
Noticed how Google sometimes shows an author’s photo next to search results? This is great for your readers as they get to easily identify posts by you, and it’s great for you as the attention grabbing photo’s will increase your clickthrough rate.
To get this happening for your posts, we need to tie them to your Google+ account.
Verify your email address with Google
Google like to be sure you are who you say you are, so to start you need to ensure that at least one email address with a matching domain to that of your blog is registered with your Google+ account.
Link your Google+ account to your blog
When viewing the ‘About’ page on your Google profile, you’ll notice a section which lists ‘Contributes To’ - You need to edit this list and add the homepage of your blog.
Link your blog to your Google+ account
We have a particular approach for adding authors to our Jekyll site but if you don’t use Jekyll, you can read between the lines for this bit.
You’ll need to get the URL of your Google+ profile, you can get this by browsing to your profile and copying the URL in the address bar - then add it to your authors details in the _data/authors.yml file.
# Author details.
robert_rawlins:
name: Robert Rawlins
email: robert@sorryapp.com
google_plus: https://plus.google.com/106303581466759705253
Next, we want to place this link in the head of our post.html template. Make special note of the rel=”author” attribute, and the addition of the ?rel=author query param as this is what Google uses to find the link on your page.
<head>
...
<!-- Authorship details. -->
<!-- Output author details if some exist. -->
{% if author.google_plus %}
<!-- Link to the authors Google page. -->
<link rel="author" href="{{ author.google_plus }}?rel=author" />
{% endif %}
...
</head>
Finally, check your changes are all correct
Google have a nice rich snippets testing tool for ensuring that all the things you’ve just added are present and correct.
Once the testing tool is giving you the thumbs up you’re all done. It’s now just about waiting for Google to judge that displaying your photo under certain search terms is worthwhile.