diff --git a/fedireads/templates/author.html b/fedireads/templates/author.html index 7c54361e..191ad6ba 100644 --- a/fedireads/templates/author.html +++ b/fedireads/templates/author.html @@ -4,6 +4,10 @@

{{ author.data.name }}

+ {% if author.data.bio %} +
{{ author.data.bio | author_bio }} +
+ {% endif %} {% for book in books %}
{% include 'snippets/book.html' with book=book size=large description=True %} diff --git a/fedireads/templatetags/fr_display.py b/fedireads/templatetags/fr_display.py index a112b436..9beec01d 100644 --- a/fedireads/templatetags/fr_display.py +++ b/fedireads/templatetags/fr_display.py @@ -26,3 +26,9 @@ def description_format(description): description = description.split('----------')[0] return description.strip() + +@register.filter(name='author_bio') +def bio_format(bio): + ''' clean up OL author bios ''' + bio = bio.split('\n') + return bio[0].strip()