Replace "hidden" check in Liquid with where_exp

This commit is contained in:
iBug
2024-05-05 03:18:27 +08:00
parent bde92b6d4a
commit 6165d896a0
7 changed files with 16 additions and 23 deletions

View File

@ -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 -%}