_layouts/home.html in jekyll-theme-isotc211-0.2.1 vs _layouts/home.html in jekyll-theme-isotc211-0.2.2

- old
+ new

@@ -3,17 +3,21 @@ bodyClass: home --- {{ content }} -<section class="news"> - <h2 class="section-title">News</h2> +{% assign num_posts = site.posts | size %} - <div class="items"> - {% for post in site.posts %} - <article class="news-item-card"> - <h3 class="title"><a href="{{ post.url | relative_url }}">{{ post.title }}</a></h3> - <div class="excerpt">{{ post.excerpt }}</div> - </article> - {% endfor %} - </div> -</section> +{% if num_posts > 0 %} + <section class="news"> + <h2 class="section-title">News</h2> + + <div class="items"> + {% for post in site.posts %} + <article class="news-item-card"> + <h3 class="title"><a href="{{ post.url | relative_url }}">{{ post.title }}</a></h3> + <div class="excerpt">{{ post.excerpt }}</div> + </article> + {% endfor %} + </div> + </section> +{% endif %}