Links to author social media

This commit is contained in:
Martin Danielsson 2016-02-14 20:40:18 +01:00
parent d6cca9067a
commit 9c2564ed35
15 changed files with 101 additions and 14 deletions

View file

@ -13,7 +13,17 @@ layout: page
</h3>
{% endif %}
</a>
<p class="post-meta">Posted by {% if post.author %}{{ post.author }}{% else %}{{ site.title }}{% endif %} on {{ post.date | date: "%B %-d, %Y" }}</p>
{% if post.author %}
{% assign author = site.data.authors[post.author] %}
{% if author %}
{% assign author_name = author.name %}
{% else %}
{% assign author_name = post.author %}
{% endif %}
{% else %}
{% assign author_name = site.title %}
{% endif %}
<p class="post-meta">Posted by {{ author_name }} on {{ post.date | date: "%B %-d, %Y" }}</p>
</div>
<hr>
{% endfor %}