From 4b116c17b0061cd4a9c6d95a325a5473f8a763c0 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Wed, 23 Mar 2022 09:59:27 +0300 Subject: sidebar: don't print anything if there're no posts --- _includes/common/sidebar.html | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to '_includes') diff --git a/_includes/common/sidebar.html b/_includes/common/sidebar.html index 825f73e..113d171 100644 --- a/_includes/common/sidebar.html +++ b/_includes/common/sidebar.html @@ -23,11 +23,9 @@  {{ author_email }} + {% if site.posts.size > 0 %}

Latest posts

- {% if site.posts.size == 0 %} -

Sorry, there're no posts yet.

- {% else %}
{% for post in site.posts limit: 5 %} @@ -36,6 +34,6 @@ {% endfor %}
- {% endif %}
+ {% endif %} -- cgit v1.2.3