We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 89b410c + 78e4695 commit b382340Copy full SHA for b382340
src/pages/index.astro
@@ -36,7 +36,11 @@ const allPosts = allMarkdownPosts
36
: undefined,
37
url: post.url,
38
}))
39
- .sort((a, b) => b.date.valueOf() - a.date.valueOf())
+ .sort((a, b) => {
40
+ let aDate = a.updatedDate?.valueOf() ?? a.date.valueOf()
41
+ let bDate = b.updatedDate?.valueOf() ?? b.date.valueOf()
42
+ return bDate - aDate
43
+ })
44
45
// Full Astro Component Syntax:
46
// https://docs.astro.build/core-concepts/astro-components/
0 commit comments