Lego2012
2/2/2017 - 2:14 PM

Author Overrides

Author Overrides

<!--
In cases where an author isn’t set {{ site.owner }} values in _config.yml are used instead
-->

{% if page.author %}
  {% assign author = site.data.authors[page.author] %}{% else %}{% assign author = site.owner %}
{% endif %}

{% if author.avatar contains 'http' %}
  <img src="{{ author.avatar }}" class="bio-photo" alt="{{ author.name }} bio photo"></a>
{% elsif author.avatar %}
  <img src="{{ site.url }}/assets/images/{{ author.avatar }}" alt="{{ author.name }} bio photo"></a>
{% endif %}

<h3 class="author-name">{{ author.name }}</h3>

{% if author.bio %}<p class="author-bio">{{ author.bio }}</p>{% endif %}
# /_data/authors.yml

billy_rick:
  name: Billy Rick
  web: http://
  email: billy@rick.com
  bio: "I am a very extravagant man."
  avatar: billy-rick-photo.jpg

cornelius_fiddlebone:
  name: Cornelius Fiddlebone
  email: cornelius@fiddlebone.com
  bio: "Jewel miner."
  avatar: cornelius-fiddlebone-photo.jpg