Skip to content

Commit e899b2d

Browse files
authored
remove hidden posts from /posts (mmistakes#2625)
1 parent e6a556b commit e899b2d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

_layouts/posts.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
{{ content }}
66

77
<ul class="taxonomy__index">
8-
{% assign postsInYear = site.posts | group_by_exp: 'post', 'post.date | date: "%Y"' %}
8+
{% assign postsInYear = site.posts | where_exp: "item", "item.hidden != true" | group_by_exp: 'post', 'post.date | date: "%Y"' %}
99
{% for year in postsInYear %}
1010
<li>
1111
<a href="#{{ year.name }}">
@@ -15,7 +15,7 @@
1515
{% endfor %}
1616
</ul>
1717

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

0 commit comments

Comments
 (0)