Skip to content

Commit 072d8c1

Browse files
amkartashovchukycheese
authored andcommitted
remove hidden posts from /posts (mmistakes#2625)
1 parent 8c677e4 commit 072d8c1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

_layouts/post.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
</div>
1818

1919
<ul class="taxonomy__index">
20-
{% assign postsInYear = site.posts | group_by_exp: 'post', 'post.date | date: "%Y"' %}
20+
{% assign postsInYear = site.posts | where_exp: "item", "item.hidden != true" | group_by_exp: 'post', 'post.date | date: "%Y"' %}
2121
{% for year in postsInYear %}
2222
<li>
2323
<a href="#{{ year.name }}">
@@ -27,7 +27,7 @@
2727
{% endfor %}
2828
</ul>
2929

30-
{% assign postsByYear = site.posts | group_by_exp: 'post', 'post.date | date: "%Y"' %}
30+
{% assign postsByYear = site.posts | where_exp: "item", "item.hidden != true" | group_by_exp: 'post', 'post.date | date: "%Y"' %}
3131
{% for year in postsByYear %}
3232
<section id="{{ year.name }}" class="taxonomy__section">
3333
<h2 class="archive__subtitle">{{ year.name }}</h2>

0 commit comments

Comments
 (0)