Skip to content

Commit

Permalink
build fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Mordechai Dror committed Sep 24, 2023
1 parent d4e5f67 commit 88ed292
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/pages/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ import { getCollection } from 'astro:content';
import Layout from '../layouts/Layout.astro';
const posts = (await getCollection('posts')).sort((a,b) => {
return new Date(b.data.publishedAt) - new Date(a.data.publishedAt);
const bPublishedAt = new Date(b.data.publishedAt);
const aPublishedAt = new Date(a.data.publishedAt);
return bPublishedAt.getTime() - aPublishedAt.getTime();
});
---
Expand Down

0 comments on commit 88ed292

Please sign in to comment.