Skip to content

Commit

Permalink
Clean up date comparision fix
Browse files Browse the repository at this point in the history
  • Loading branch information
arkon committed Jan 8, 2024
1 parent 709251e commit 248d82e
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion website/src/.vitepress/config/hooks/generateFeed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion website/src/.vitepress/theme/data/news.data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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()))
},
})
2 changes: 1 addition & 1 deletion website/src/news/2023-09-10-updated-website.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion website/src/news/2024-01-09-extensions-removal.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 248d82e

Please sign in to comment.