diff options
Diffstat (limited to 'src/pages')
| -rw-r--r-- | src/pages/rss.xml.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/pages/rss.xml.js b/src/pages/rss.xml.js index 7d054b9..9041051 100644 --- a/src/pages/rss.xml.js +++ b/src/pages/rss.xml.js @@ -4,6 +4,7 @@ import { SITE_TITLE, SITE_DESCRIPTION } from '../consts'; export async function get(context) { const posts = await getCollection('blog'); + posts.sort((a, b) => new Date(b.data.pubDate).getTime() - new Date(a.data.pubDate).getTime()); return rss({ title: SITE_TITLE, description: SITE_DESCRIPTION, @@ -13,4 +14,4 @@ export async function get(context) { link: `/blog/${post.slug}/`, })), }); -} +}
\ No newline at end of file |
