diff --git a/src/pages/posts.astro b/src/pages/posts.astro index 2f65a5a..7e8169a 100644 --- a/src/pages/posts.astro +++ b/src/pages/posts.astro @@ -10,8 +10,8 @@ import { SITE_TITLE, SITE_DESCRIPTION } from "../config"; // Use Astro.glob() to fetch all posts, and then sort them by date. const posts = (await Astro.glob("../posts/*.md")).sort( (a, b) => - new Date(b.frontmatter.added).valueOf() - - new Date(a.frontmatter.added).valueOf() + new Date(b.frontmatter.updated || b.frontmatter.added).valueOf() - + new Date(a.frontmatter.updated || a.frontmatter.added).valueOf() ); ---