Skip to content

Commit

Permalink
remove hidden posts from /posts (mmistakes#2625)
Browse files Browse the repository at this point in the history
  • Loading branch information
amkartashov authored and chukycheese committed Sep 18, 2023
1 parent 8c677e4 commit 072d8c1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions _layouts/post.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
</div>

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

{% 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 %}
<section id="{{ year.name }}" class="taxonomy__section">
<h2 class="archive__subtitle">{{ year.name }}</h2>
Expand Down

0 comments on commit 072d8c1

Please sign in to comment.