diff --git a/src/_data/tags.js b/src/_data/tags.js index a0a90c3..aff7c0f 100644 --- a/src/_data/tags.js +++ b/src/_data/tags.js @@ -5,7 +5,7 @@ module.exports = async () => { const cache = await postCache(); return Object.values(cache.tags).map(tag => { - const posts = Object.values(cache.posts).filter(post => post.tags.includes(tag.id)); + const posts = Object.values(cache.posts).filter(post => post.tags.includes(tag.id)).sort((a, b) => new Date(b.date).getTime() - new Date(a.date).getTime()); return { ...tag,