summaryrefslogtreecommitdiff
path: root/src/pages
diff options
context:
space:
mode:
Diffstat (limited to 'src/pages')
-rw-r--r--src/pages/micro/rss.xml.ts8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/pages/micro/rss.xml.ts b/src/pages/micro/rss.xml.ts
index 5b388b6..37d7d39 100644
--- a/src/pages/micro/rss.xml.ts
+++ b/src/pages/micro/rss.xml.ts
@@ -28,12 +28,20 @@ export const GET = async (context: APIContext) => {
fullContent += imagesHtml;
}
+ // Build author customData for RSS
+ let authorCustomData = "";
+ if (post.data.author) {
+ const authorName = post.data.author.displayName || post.data.author.username;
+ authorCustomData = `<author>${authorName}</author><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">${authorName}</dc:creator>`;
+ }
+
return {
title: post.data.title,
pubDate: post.data.publishDate,
link: `micro/${post.id}/`,
description: post.data.description,
content: fullContent,
+ customData: authorCustomData,
};
});