From 45794a21cdddc7ded1c6a948168b6d11ad5af2d1 Mon Sep 17 00:00:00 2001 From: Tim 'Piepmatz' Hesse Date: Tue, 10 Jun 2025 23:20:49 +0200 Subject: [PATCH] sort same date posts by path --- .vuepress/components/BlogPosts.vue | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.vuepress/components/BlogPosts.vue b/.vuepress/components/BlogPosts.vue index d64a6915842..be4be5a21f6 100644 --- a/.vuepress/components/BlogPosts.vue +++ b/.vuepress/components/BlogPosts.vue @@ -29,7 +29,10 @@ export default { let path = p.path.replace('/blog/', ''); return { ...p, path: path, date: path.substring(0, 10) }; }) - .sort((a, b) => new Date(b.date) - new Date(a.date)); + .sort( + (a, b) => + new Date(b.date) - new Date(a.date) || b.path.localeCompare(a.path), + ); }, }, };