diff options
Diffstat (limited to '_layouts/index.html')
-rw-r--r-- | _layouts/index.html | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/_layouts/index.html b/_layouts/index.html index 3c145d0..73b97ef 100644 --- a/_layouts/index.html +++ b/_layouts/index.html @@ -2,12 +2,14 @@ layout: default --- <h1>{{ site.t.recent_posts[page.lang] }}</h1> -<ul> - {%- for post in site.posts -%} - {% if post.lang == page.lang %} - <li> - <a href="{{ post.url }}">{{ post.title | escape }}</a> - {{ post.date | date: site.t.date_format[page.lang] }} - </li> - {% endif %} - {%- endfor -%} -</ul> +{% if site.posts.size > 0 %} + <ul> + {%- for post in site.posts -%} + {% if post.lang == page.lang %} + <li> + <a href="{{ post.url }}">{{ post.title | escape }}</a> - {{ post.date | date: site.t.date_format[page.lang] }} + </li> + {% endif %} + {%- endfor -%} + </ul> +{% endif %} |