diff --git a/src/pages/tags/[tag].astro b/src/pages/tags/[tag].astro index 5127fc5..30e6148 100644 --- a/src/pages/tags/[tag].astro +++ b/src/pages/tags/[tag].astro @@ -34,6 +34,15 @@ const { tag } = Astro.params;

#{tag}

- {posts.map((post) => )} + { + posts + // Reverse chronological order + .sort( + (a, b) => + new Date(b.frontmatter.datePublished).getTime() - + new Date(a.frontmatter.datePublished).getTime() + ) + .map((post) => ) + }