Clean up date comparision fix

This commit is contained in:
arkon 2024-01-08 18:42:25 -05:00
parent 709251e0a2
commit 248d82e739
4 changed files with 4 additions and 4 deletions

View File

@ -47,7 +47,7 @@ async function generateFeed(config: SiteConfig, hostname: string) {
link: fullUrl,
description: frontmatter.description,
content,
date: typeof frontmatter.date == 'string' ? new Date(frontmatter.date) : frontmatter.date,
date: frontmatter.date,
} satisfies Item
feed.addItem(post)

View File

@ -24,6 +24,6 @@ export default createContentLoader('news/*.md', {
url,
},
)
.sort((a, b) => b.date.localeCompare(a.date))
.sort((a, b) => b.date.toString().localeCompare(a.date.toString()))
},
})

View File

@ -2,7 +2,7 @@
type: article
title: Updated website
description: We've got a fresh new website we hope will be even easier to use
date: "2023-09-10"
date: 2023-09-10
---
# Updated website

View File

@ -2,7 +2,7 @@
type: article
title: Extensions list removed
description: Due to extenuating circumstances.
date: "2024-01-09"
date: 2024-01-09
---
# Extensions list removed