diff --git a/layout/_partial/sidebar/widgets/recent.ejs b/layout/_partial/sidebar/widgets/recent.ejs index 208dcbd..37d366e 100644 --- a/layout/_partial/sidebar/widgets/recent.ejs +++ b/layout/_partial/sidebar/widgets/recent.ejs @@ -20,11 +20,12 @@ function layoutDiv() { } return false }) + arr = arr.sort((p1, p2) => p1.updated > p2.updated ? -1 : 1) } else { arr = site.posts.filter( p => p.title && p.title.length > 0) + arr = arr.sort("updated", -1) } el += '