diff --git a/CHANGELOG.md b/CHANGELOG.md index 82b0dee3..0ad7de1f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ - Add support for [Jekyll Paginate V2](https://github.com/sverrirs/jekyll-paginate-v2) 🎉 [#2636](https://github.com/mmistakes/minimal-mistakes/pull/2636) - Auto scroll sticky ToC with content. [#3115](https://github.com/mmistakes/minimal-mistakes/pull/3115) +- Replace "hidden" check in Liquid templates with `where_exp: "item", "item.hidden != true"`. ### Documentation & Maintenance diff --git a/_includes/documents-collection.html b/_includes/documents-collection.html index e88d8c4c..bb19bfb6 100644 --- a/_includes/documents-collection.html +++ b/_includes/documents-collection.html @@ -1,4 +1,4 @@ -{% assign entries = site[include.collection] %} +{% assign entries = site[include.collection] | where_exp: "post", "post.hidden != true" %} {% if include.sort_by %} {% assign entries = entries | sort: include.sort_by %} @@ -9,7 +9,5 @@ {% endif %} {%- for post in entries -%} - {%- unless post.hidden -%} - {% include archive-single.html %} - {%- endunless -%} + {% include archive-single.html %} {%- endfor -%} diff --git a/_includes/page__related.html b/_includes/page__related.html index 1b655d6d..9777865e 100644 --- a/_includes/page__related.html +++ b/_includes/page__related.html @@ -1,14 +1,10 @@ +{% assign posts = include.posts | where_exp: "post", "post.hidden != true" %}