Skip to content

Commit

Permalink
Fix future events in ascending order
Browse files Browse the repository at this point in the history
Past events should be reverse chronologically (oldest at top)
Upcoming events should be in the default chronological order (earliest
next date = top)
  • Loading branch information
b-n committed Nov 30, 2024
1 parent 3c2ca58 commit 7bf0477
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions _includes/events.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
role="list"
>
{% assign events = site.events | filter_tags: include.tags | reverse %}
{% assign future_events = events | where_exp: 'event', 'event.date >= site.time' %}
{% if include.limit and future_events.size > 0 %}
{% for event in future_events reversed limit: include.limit %}
{% assign future_events = site.events | where_exp: 'event', 'event.date >= site.time' %}
{% if future_events.size > 0 %}
{% for event in future_events limit: include.limit %}
{% include event-card.html %}
{% endfor %}
{% else %}
Expand Down

0 comments on commit 7bf0477

Please sign in to comment.