Add author born/death years to search results

For it to be simpler to discern between authors that share names, add
their birth and death years to the list.

With both years set, displayed `(1970-2024)`
Dead authors with no set birth year are displayed `(-1970)`.
Currently alive ones are displayed `(1970-)`
This commit is contained in:
Trond Kjetil Bremnes 2024-11-20 21:32:02 +01:00
parent 61845678c4
commit b0d090e8fc

View file

@ -8,6 +8,9 @@
<li class="">
<a href="{{ author.local_path }}" class="author" itemprop="author" itemscope itemtype="https://schema.org/Thing">
<span itemprop="name">{{ author.name }}</span>
{% if author.born or author.died %}
<span>({{ author.born|date:"Y" }}-{{ author.died|date:"Y" }})</span>
{% endif %}
</a>
</li>
{% endfor %}