diff --git a/templates/article.html b/templates/article.html index 243b1f5..d22ae86 100644 --- a/templates/article.html +++ b/templates/article.html @@ -19,7 +19,19 @@ {% endif %}

{{ article.title }}

- {{ _('Posted on %(when)s in %(category)s', + {% if not SHOW_POST_AUTHOR %} + {% set auth_str = '' %} + {% else %} + {% set auth_str = [] %} + {% for auth in article.authors %} + {{ auth_str.append('%s'|format(SITEURL, auth.url, auth)|safe) or ''}} + {% else %} + {{ auth_str.append('%s'|format(SITEURL, article.author.url, article.author)|safe) or ''}} + {% endfor %} + {% set auth_str = ' by ' ~ auth_str|join(', ') %} + {% endif %} + {{ _('Posted%(auth_str)s on %(when)s in %(category)s', + auth_str=auth_str, when=article.locale_date, category='%s'|format(SITEURL, article.category.url, article.category)|safe) }} diff --git a/templates/index.html b/templates/index.html index 008ddc3..2986809 100644 --- a/templates/index.html +++ b/templates/index.html @@ -17,7 +17,19 @@

{{ article.title }}

- {{ _('Posted on %(when)s in %(category)s', + {% if not SHOW_POST_AUTHOR %} + {% set auth_str = '' %} + {% else %} + {% set auth_str = [] %} + {% for auth in article.authors %} + {{ auth_str.append('%s'|format(SITEURL, auth.url, auth)|safe) or ''}} + {% else %} + {{ auth_str.append('%s'|format(SITEURL, article.author.url, article.author)|safe) or ''}} + {% endfor %} + {% set auth_str = ' by ' ~ auth_str|join(', ') %} + {% endif %} + {{ _('Posted%(auth_str)s on %(when)s in %(category)s', + auth_str=auth_str, when=article.locale_date, category='%s'|format(SITEURL, article.category.url, article.category)|safe) }}