* Implement AUTHOR_BIO "name" and "cover" fields. In the theme readme, there's are "name" and "cover" fields in the AUTHOR_BIO example, but these two fields weren't implemented yet. Instead, the author page was displaying the author entry through the title Jinja2 filter (which doesn't work so well for surnames like mine, which contains multiple capital letters ;) ), and the cover image was being used for the avatar image. This change uses the "name" and "cover" fields for these, respectfully. The cover image on the author page will also gracefully fall back to the site default if an author cover isn't specified as well. * Correct name author name display in post loop * Set author name if author bio not set default author name string will be title and that can be override form auther bio name
43 lines
1.8 KiB
HTML
43 lines
1.8 KiB
HTML
<div class="extra-pagination">
|
|
{% include "partials/pagination.html" %}
|
|
</div>
|
|
|
|
{% for article in articles_page.object_list %}
|
|
<article class="post">
|
|
<div class="inner">
|
|
<header class="post-header">
|
|
<h2 class="post-title"><a href="{{ SITEURL }}/{{ article.url }}" rel="bookmark" title="Permalink to {{ article.title|striptags }}">{{ article.title }}</a>
|
|
</h2>
|
|
<span class="post-meta">
|
|
{% for author in article.authors %}
|
|
{% set author_name = author.name | title %}
|
|
{% if AUTHORS_BIO and author.name.lower() in AUTHORS_BIO %}
|
|
{% set author_name = AUTHORS_BIO[author.name.lower()].name or author.name %}
|
|
{% endif %}
|
|
<a href="{{ SITEURL }}/{{ author.url }}">{{ author_name }}</a>
|
|
{% endfor %}
|
|
| <time datetime="{{ article.locale_date }}">{{ article.locale_date }}</time>
|
|
</span>
|
|
<div class="clear"></div>
|
|
</header>
|
|
{% if SHOW_FULL_ARTICLE %}
|
|
<section class="post-content">
|
|
{{ article.content }}
|
|
</section>
|
|
{% else %}
|
|
<section class="post-excerpt">
|
|
<p>
|
|
{% if article.has_summary %}
|
|
{{ article.summary }}
|
|
{% elif article.summary %}
|
|
{{ article.summary|striptags|truncate(250) }}
|
|
{% endif %}
|
|
</p>
|
|
</section>
|
|
{% endif %}
|
|
{% include 'partials/comments_count.html' %}
|
|
</div>
|
|
</article>
|
|
{% endfor %}
|
|
|
|
{% include "partials/pagination.html" %}
|