Order tag posts by descending date
This commit is contained in:
parent
483d11b88d
commit
e828f9f590
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user