From ff47d0e3f83332e81931a5beb6ed1785806cef74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Carlos=20Manzanero=20Dom=C3=ADnguez?= Date: Tue, 2 Jul 2024 15:10:47 -0600 Subject: [PATCH 1/3] add feed img --- src/pages/rss.xml.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/pages/rss.xml.ts b/src/pages/rss.xml.ts index dcd7970..f349b6a 100644 --- a/src/pages/rss.xml.ts +++ b/src/pages/rss.xml.ts @@ -114,10 +114,12 @@ export async function GET(context: any) { return rss({ title: "juancmandev", description: "Welcome to my domain, stranger.", - customData: `en-us - https://juancman.dev/logo.png - juancmandev - `, + customData: [ + "en-us", + ``, + ``, + , + ].join(""), site: context.site, items, trailingSlash: false, From 64d78c39f9bed375f4a6f4bac1323ecce1b59ba2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Carlos=20Manzanero=20Dom=C3=ADnguez?= Date: Tue, 2 Jul 2024 15:15:28 -0600 Subject: [PATCH 2/3] try another format --- src/pages/rss.xml.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/pages/rss.xml.ts b/src/pages/rss.xml.ts index f349b6a..0f163ed 100644 --- a/src/pages/rss.xml.ts +++ b/src/pages/rss.xml.ts @@ -116,9 +116,12 @@ export async function GET(context: any) { description: "Welcome to my domain, stranger.", customData: [ "en-us", - ``, - ``, - , + ` + + https://juancman.dev/logo.png + juancmandev + https://juancman.dev + `, ].join(""), site: context.site, items, 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 3/3] 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, });