Skip to content

Commit bfb0489

Browse files
committed
add categories to bottom of post and show "Categories: none" if no categories are there. creativecommons#51
1 parent 33eb628 commit bfb0489

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

templates/blog-post.html

+9-3
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,15 @@
33
{% block header %}{{ this.parent.title }}{% endblock %}
44
{% block body %}
55
<h2 class="mb-0">{{ this.title }}</h2>
6-
<p class="meta mt-0 mb-0"><span class="text-muted">Categories: </span>{% for category in this.categories %}
7-
<a href="#">{{category}}</a>{{ "," if not loop.last}}
8-
{% endfor %}</p>
96
<p class="meta text-muted mt-0">by {{ this.author }} on {{ this.pub_date|dateformat('full') }}</p>
107
<div class="body">{{ this.body }}</div>
8+
<hr>
9+
<p class="meta mt-0 mb-0"><span class="text-muted">Categories: </span>
10+
{% if this.categories|length %}
11+
{% for category in this.categories %}
12+
<a href="#">{{category}}</a>{{ "," if not loop.last}}
13+
{% endfor %}</p>
14+
{% else %}
15+
none
16+
{% endif %}
1117
{% endblock %}

0 commit comments

Comments
 (0)