Skip to content

Commit 7fc064b

Browse files
committed
Try not rendering empty post
1 parent 0f76583 commit 7fc064b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

blog/categories.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ <h5 id="#{{ category | first }}">&raquo; {{ category | first | capitalize }}</h5
1212
<ul>
1313
{% for posts in category %}
1414
{% for post in posts %}
15-
<li><a href="{{ post.url }}">{{ post.title }}</a> <span class="byline">&dash; {{ post.date | date: "%B %d, %Y" }}</span></li>
15+
{% if post != null %}
16+
<li><a href="{{ post.url }}">{{ post.title }}</a> <span class="byline">&dash; {{ post.date | date: "%B %d, %Y" }}</span></li>
17+
{% endif %}
1618
{% endfor %}
1719
{% endfor %}
1820
</ul>

0 commit comments

Comments
 (0)