M _includes/author-profile.html => _includes/author-profile.html +20 -3
@@ 9,15 9,32 @@
{% if author.avatar %}
<div class="author__avatar">
{% if author.avatar contains "://" %}
- <img src="{{ author.avatar }}" alt="{{ author.name }}" itemprop="image">
+ {% assign author_src = author.avatar %}
{% else %}
- <img src="{{ author.avatar | absolute_url }}" class="author__avatar" alt="{{ author.name }}" itemprop="image">
+ {% assign author_src = author.avatar | absolute_url %}
+ {% endif %}
+
+ {% if author.home %}
+ {% if author.home contains "://" %}
+ {% assign author_link = author.home %}
+ {% else %}
+ {% assign author_link = author.home | absolute_url %}
+ {% endif %}
+ <a href="{{ author_link }}">
+ <img src="{{ author_src }}" alt="{{ author.name }}" itemprop="image">
+ </a>
+ {% else %}
+ <img src="{{ author_src }}" alt="{{ author.name }}" itemprop="image">
{% endif %}
</div>
{% endif %}
<div class="author__content">
- <h3 class="author__name" itemprop="name">{{ author.name }}</h3>
+ {% if author.home %}
+ <a href="{{ author_link }}"><h3 class="author__name" itemprop="name">{{ author.name }}</h3></a>
+ {% else %}
+ <h3 class="author__name" itemprop="name">{{ author.name }}</h3>
+ {% endif %}
{% if author.bio %}
<p class="author__bio" itemprop="description">
{{ author.bio }}
M => +5 -0
@@ 128,6 128,11 @@
padding-left: 0;
padding-right: 0;
}
a {
color: inherit;
text-decoration: none;
}
}
.author__name {