From e2eb2da37594c7f83a998b8345ebae34c75b3274 Mon Sep 17 00:00:00 2001 From: Cory Dransfeldt Date: Sun, 18 Feb 2024 21:35:08 -0800 Subject: [PATCH] fix: link sort --- package.json | 2 +- src/_data/links.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index b991a8c7..fa4441cf 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "coryd.dev", - "version": "6.0.1", + "version": "6.0.2", "description": "The source for my personal site. Built using 11ty and hosted on Netlify.", "type": "module", "scripts": { diff --git a/src/_data/links.js b/src/_data/links.js index 8f4245e1..84811b03 100644 --- a/src/_data/links.js +++ b/src/_data/links.js @@ -79,9 +79,9 @@ export default async function () { if (process.env.ELEVENTY_PRODUCTION) { const mergedData = filterDuplicates([ - ...Object.values(cachedLinks), ...formatLinkData(fullData).filter((link) => link.tags.includes('share')) - ]) + ...Object.values(cachedLinks), + ]).sort((a, b) => new Date(b['date']) - new Date(a['date'])) await client.send( new PutObjectCommand({