Skip to content

Commit

Permalink
sort category posts
Browse files Browse the repository at this point in the history
  • Loading branch information
MuhammadAhsan252 committed Dec 10, 2024
1 parent 66617d9 commit 019ac4b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion _layouts/category.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ <h2>
</h2>

<!-- Retrieve and sort posts by 'revdate' in descending order -->
{% assign sorted_posts = page.posts | sort: 'revdate' %}
{% assign sorted_posts = page.posts | sort: 'date' | reverse %}

<!-- Iterate through each sorted post -->
{% for post in sorted_posts %}
Expand Down

0 comments on commit 019ac4b

Please sign in to comment.