Skip to content

Commit 3d685a1

Browse files
committed
Show related posts only when there are 1 or more
1 parent 3bbb097 commit 3d685a1

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

_layouts/post.html

+2
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ <h1><a href="{{ site.url }}{{ page.url }}" rel="bookmark" title="{{ page.title }
5555
</div><!-- /#main -->
5656

5757
<div class="footer-wrap">
58+
{% if site.related_posts.size > 0 %}
5859
<div class="related-articles">
5960
<h4>You might also enjoy <small class="pull-right">(<a href="{{ site.url }}/posts/">View all posts</a>)</small></h4>
6061
<ul>
@@ -64,6 +65,7 @@ <h4>You might also enjoy <small class="pull-right">(<a href="{{ site.url }}/post
6465
</ul>
6566
<hr />
6667
</div><!-- /.related-articles -->
68+
{% endif %}
6769
<footer>
6870
{% include _footer.html %}
6971
</footer>

0 commit comments

Comments
 (0)