From e77b42e991fb7a8a3e9b4e0731197512409bd560 Mon Sep 17 00:00:00 2001 From: Robert Oostenveld Date: Thu, 28 Nov 2024 11:59:52 +0100 Subject: [PATCH] FIX - ensure that posts are sorted before selecting the last ones --- index.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/index.md b/index.md index 55a5eb5a4..4eb418229 100644 --- a/index.md +++ b/index.md @@ -25,7 +25,8 @@ To get started, head over to the [getting started](/getting_started) documentati _The latest code developments can be tracked in detail on [GitHub](/development/git)._ {% assign counter = 0 %} -{% for post in site.posts %} +{% assign posts = site.posts | sort | reverse %} +{% for post in posts %} {% if post.category == 'release' %} {% if counter == 0 %} @@ -105,7 +106,8 @@ _These are recent citations on [Pubmed](https://pubmed.ncbi.nlm.nih.gov/21253357 _You can also follow us on [Mastodon](https://fosstodon.org/@fieldtriptoolbox)._ {% assign counter = 0%} -{% for post in site.posts %} +{% assign posts = site.posts | sort | reverse %} +{% for post in posts %} {% if post.category == 'news' %} {% if counter < 7 %}