Skip to content

Commit 8cd83fd

Browse files
authored
Fallback to github image if gravatar is nil (#479)
Updates the post layout to fallback to the author's github profile image if their gravatar is not set. Fixes #476
1 parent 01a78b5 commit 8cd83fd

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

_layouts/post.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ <h1>{{ page.title }}</h1>
1313
<div class="byline">
1414
{% if author.gravatar %}
1515
<img src="https://www.gravatar.com/avatar/{{ author.gravatar }}?s=64&d=mp" alt="{{ author.name }}"/>
16+
{% elsif author.github %}
17+
<img src="https://www.github.com/{{ author.github }}.png?size=64" alt="{{ author.name }}"/>
1618
{% else %}
1719
<img src="https://www.gravatar.com/avatar/dummy?s=64&d=mp&f=y" alt="{{ author.name }}"/>
1820
{% endif %}

0 commit comments

Comments
 (0)