add attributes to rss feed
This commit is contained in:
parent
64d78c39f9
commit
9541f66256
@ -61,7 +61,6 @@ export async function GET(context: any) {
|
|||||||
title: post.data.title,
|
title: post.data.title,
|
||||||
pubDate: post.data.date,
|
pubDate: post.data.date,
|
||||||
description: post.data.description,
|
description: post.data.description,
|
||||||
author: post.data.author,
|
|
||||||
link: `/blog/${post.slug}/`,
|
link: `/blog/${post.slug}/`,
|
||||||
content: sanitizeHtml(html.toString(), {
|
content: sanitizeHtml(html.toString(), {
|
||||||
allowedTags: sanitizeHtml.defaults.allowedTags.concat(["img"]),
|
allowedTags: sanitizeHtml.defaults.allowedTags.concat(["img"]),
|
||||||
@ -103,7 +102,6 @@ export async function GET(context: any) {
|
|||||||
title: project.data.title,
|
title: project.data.title,
|
||||||
pubDate: project.data.date,
|
pubDate: project.data.date,
|
||||||
description: project.data.description,
|
description: project.data.description,
|
||||||
author: project.data.author,
|
|
||||||
link: `/portfolio/${project.slug}/`,
|
link: `/portfolio/${project.slug}/`,
|
||||||
content: sanitizeHtml(html.toString(), {
|
content: sanitizeHtml(html.toString(), {
|
||||||
allowedTags: sanitizeHtml.defaults.allowedTags.concat(["img"]),
|
allowedTags: sanitizeHtml.defaults.allowedTags.concat(["img"]),
|
||||||
@ -112,18 +110,19 @@ export async function GET(context: any) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return rss({
|
return rss({
|
||||||
|
xmlns: { atom: "http://www.w3.org/2005/Atom" },
|
||||||
title: "juancmandev",
|
title: "juancmandev",
|
||||||
description: "Welcome to my domain, stranger.",
|
description: "Welcome to my domain, stranger.",
|
||||||
|
site: context.site,
|
||||||
customData: [
|
customData: [
|
||||||
"<language>en-us</language>",
|
"<language>en-us</language>",
|
||||||
`
|
`<image>
|
||||||
<image>
|
<url>https://www.juancman.dev/logo.png</url>
|
||||||
<url>https://juancman.dev/logo.png</url>
|
|
||||||
<title>juancmandev</title>
|
<title>juancmandev</title>
|
||||||
<link>https://juancman.dev</link>
|
<link>https://www.juancman.dev</link>
|
||||||
</image>`,
|
</image>`,
|
||||||
|
`<atom:link href="${context.site}rss.xml" rel="self" type="application/rss+xml"/>`,
|
||||||
].join(""),
|
].join(""),
|
||||||
site: context.site,
|
|
||||||
items,
|
items,
|
||||||
trailingSlash: false,
|
trailingSlash: false,
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user