feat: more modern way to use 'reference' to get authors

This commit is contained in:
grassblock 2025-06-06 22:50:36 +08:00
parent 9ff40d1e9e
commit 9ecf25f3ab
4 changed files with 21 additions and 12 deletions

View file

@ -52,7 +52,16 @@ export async function GET(context) {
},
sanitize({ dropElements: ["script", "style"] }),
]);
feedItems.push({ ...post.data, link: `/post/${post.slug}/`, content });
// Make sure each feed item has required properties with proper formatting
feedItems.push({
title: post.data.title,
description: post.data.description || '',
pubDate: post.data.pubDate,
link: `${baseUrl}/post/${post.slug}`,
content,
});
}
// Return our RSS feed XML response.