Commits

Rafael Martins committed da0d5e2

avoid broken links in the default templates, when the username config doesn't includes an email address

Comments (0)

Files changed (1)

blohg/repo_template/templates/posts.html

 {% endif -%}
 
 <div class="metadata">
-    Author: <a href="mailto:{{ post.author_email }}">{{ post.author_name }}</a><br />
+    Author:
+    {% if post.author_email -%}
+    <a href="mailto:{{ post.author_email }}">{{ post.author_name }}</a>
+    {%- else %}
+    {{ post.author_name }}
+    {%- endif %}
+    <br />
     Published on: {{ post.datetime|datetimeformat }}
     {%- if post.mdatetime %} - Modified on: {{ post.mdatetime|datetimeformat }}{% endif %}
     <br />