Skip to content

Commit

Permalink
FIX: hide archive sidebar item when no posts.
Browse files Browse the repository at this point in the history
If u have no posts (only pages exists) archive item will show " 0 posts".
  • Loading branch information
ivan-nginx committed Aug 20, 2017
1 parent d4bff88 commit 7eb5a97
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion layout/_macro/sidebar.swig
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
</div>
<nav class="site-state motion-element">

{% if config.archive_dir != '/' %}
{% if config.archive_dir != '/' and site.posts.length > 0 %}
<div class="site-state-item site-state-posts">
<a href="{{ url_for(theme.menu.archives) }}">
<span class="site-state-item-count">{{ site.posts.length }}</span>
Expand Down

0 comments on commit 7eb5a97

Please sign in to comment.