Support multiple authors, via the :author:/:authors: metadata field

main
Raymond Wanyoike 2016-11-07 12:05:38 +03:00
parent 32cb3b69c2
commit fa001c23a1
2 changed files with 12 additions and 4 deletions

View File

@ -20,9 +20,13 @@
<li class="text-muted" title="{{ article.date.isoformat() }}">{{ article.locale_date }}</li>
<li>&middot;</li>
<li><a href="{{ SITEURL }}/{{ article.category.url }}">{{ article.category }}</a></li>
{% if article.author and SHOW_ARTICLE_AUTHORS %}
{% if article.authors and SHOW_ARTICLE_AUTHORS %}
<li>&middot;</li>
<li>By <a href="{{ SITEURL }}/{{ article.author.url }}">{{ article.author }}</a></li>
<li>By
{% for author in article.authors %}
<a href="{{ SITEURL }}/{{ author.url }}">{{ author }}</a>{% if not loop.last %}, {% endif %}
{% endfor %}
</li>
{% endif %}
{% if article.tags %}
<li>&middot;</li>

View File

@ -19,8 +19,12 @@ All Articles
<header class="col-sm-4 hidden-xs">
<div class="text-muted" title="{{ article.date.isoformat() }}">{{ article.locale_date }}</div>
<div><a href="{{ SITEURL }}/{{ article.category.url }}">{{ article.category }}</a></div>
{% if article.author and SHOW_ARTICLE_AUTHORS %}
<div>By <a href="{{ SITEURL }}/{{ article.author.url }}">{{ article.author }}</a></div>
{% if article.authors and SHOW_ARTICLE_AUTHORS %}
<div>By
{% for author in article.authors %}
<a href="{{ SITEURL }}/{{ author.url }}">{{ author }}</a>{% if not loop.last %}, {% endif %}
{% endfor %}
</div>
{% endif %}
</header>
<div class="col-sm-8">