From 4c113ba33331e68c7ade36a8aed127328eee039d Mon Sep 17 00:00:00 2001 From: Milad Raeisi Date: Wed, 18 Dec 2024 21:44:08 +0400 Subject: [PATCH] Add XML namespace for media in RSS feed --- src/pages/rss.xml.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/pages/rss.xml.ts b/src/pages/rss.xml.ts index 086d00f..6a34ba1 100644 --- a/src/pages/rss.xml.ts +++ b/src/pages/rss.xml.ts @@ -15,6 +15,9 @@ export async function GET(context: APIContext) { title: siteConfig.title, description: siteConfig.subtitle || 'No description', site: siteUrl, + xmlns: { + media: 'http://search.yahoo.com/mrss/', + }, items: blog.map((post) => { const imageUrl = post.data.image ? new URL(post.data.image.startsWith('/') ? post.data.image.slice(1) : post.data.image, siteUrl).toString() @@ -33,9 +36,6 @@ export async function GET(context: APIContext) { : '', }; }), - customData: ` - ${siteConfig.lang} - - `, + customData: `${siteConfig.lang}`, }); }