Order tag posts by descending date
This commit is contained in:
1 parent
483d11b88d
commit
e828f9f590
1 file changed
+1
-1
+1
-1
@@ -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,
|
||||
|
||||
Reference in new issue
Block a user