From 0ffe61aa3474c25d0f1fd8e59f9fa046d94732bd Mon Sep 17 00:00:00 2001 From: Andrey Kartashov Date: Tue, 4 Aug 2020 21:25:38 +0700 Subject: [PATCH] remove hidden posts from `/posts` (#2625) --- _layouts/posts.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/_layouts/posts.html b/_layouts/posts.html index 76d25f9..95072ce 100644 --- a/_layouts/posts.html +++ b/_layouts/posts.html @@ -5,7 +5,7 @@ layout: archive {{ content }} -{% assign postsByYear = site.posts | group_by_exp: 'post', 'post.date | date: "%Y"' %} +{% assign postsByYear = site.posts | where_exp: "item", "item.hidden != true" | group_by_exp: 'post', 'post.date | date: "%Y"' %} {% for year in postsByYear %}

{{ year.name }}

-- 2.45.2