From 05e13e78463e48156d714187b48e3454b230cd95 Mon Sep 17 00:00:00 2001 From: ashleysyg Date: Fri, 16 Feb 2024 12:59:55 -0500 Subject: [PATCH] change sort order of blog cards from newest to oldest --- components/blocks/MarkdownToCards.vue | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/components/blocks/MarkdownToCards.vue b/components/blocks/MarkdownToCards.vue index f88773a..1513325 100644 --- a/components/blocks/MarkdownToCards.vue +++ b/components/blocks/MarkdownToCards.vue @@ -174,9 +174,11 @@ export default { }); } else if (this.sortBy.name === 'Date') { // Sort by date - filtered.sort((a, b) => { - return new Date(a.date) - new Date(b.date); - }); + filtered + .sort((a, b) => { + return new Date(a.date) - new Date(b.date); + }) + .reverse(); } else if (this.sortBy.name === 'Author') { // Sort by author filtered.sort((a, b) => {