diff --git a/src/pages/lookback/[slug].astro b/src/pages/lookback/[slug].astro index 0c7fd26b..e2a907d9 100644 --- a/src/pages/lookback/[slug].astro +++ b/src/pages/lookback/[slug].astro @@ -37,7 +37,11 @@ const createTopicsByMonth = (topics: Topic[]): TopicByMonth[] => { topicsByMonth[monthIndex].topics.push(topic) } }) - return topicsByMonth + return topicsByMonth.sort((a, b) => { + if (a.month > b.month) return 1 + if (a.month < b.month) return -1 + return 0 + }) } const sortByDate = (topics: TopicByMonth[]): TopicByMonth[] => {