From 9541f66256fe593c1b220e70b8fa80271867a46a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Carlos=20Manzanero=20Dom=C3=ADnguez?= Date: Tue, 2 Jul 2024 15:57:40 -0600 Subject: [PATCH] add attributes to rss feed --- src/pages/rss.xml.ts | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/pages/rss.xml.ts b/src/pages/rss.xml.ts index 0f163ed..a38af72 100644 --- a/src/pages/rss.xml.ts +++ b/src/pages/rss.xml.ts @@ -61,7 +61,6 @@ export async function GET(context: any) { title: post.data.title, pubDate: post.data.date, description: post.data.description, - author: post.data.author, link: `/blog/${post.slug}/`, content: sanitizeHtml(html.toString(), { allowedTags: sanitizeHtml.defaults.allowedTags.concat(["img"]), @@ -103,7 +102,6 @@ export async function GET(context: any) { title: project.data.title, pubDate: project.data.date, description: project.data.description, - author: project.data.author, link: `/portfolio/${project.slug}/`, content: sanitizeHtml(html.toString(), { allowedTags: sanitizeHtml.defaults.allowedTags.concat(["img"]), @@ -112,18 +110,19 @@ export async function GET(context: any) { } return rss({ + xmlns: { atom: "http://www.w3.org/2005/Atom" }, title: "juancmandev", description: "Welcome to my domain, stranger.", + site: context.site, customData: [ "en-us", - ` - - https://juancman.dev/logo.png + ` + https://www.juancman.dev/logo.png juancmandev - https://juancman.dev + https://www.juancman.dev `, + ``, ].join(""), - site: context.site, items, trailingSlash: false, });