diff --git a/src/pages/rss.xml.ts b/src/pages/rss.xml.ts index 99223835..b671b3d7 100644 --- a/src/pages/rss.xml.ts +++ b/src/pages/rss.xml.ts @@ -1,5 +1,6 @@ import rss from "@astrojs/rss"; import { getSortedPosts } from "@utils/content-utils"; +import { url } from "@utils/url-utils"; import type { APIContext } from "astro"; import MarkdownIt from "markdown-it"; import sanitizeHtml from "sanitize-html"; @@ -30,7 +31,7 @@ export async function GET(context: APIContext) { title: post.data.title, pubDate: post.data.published, description: post.data.description || "", - link: `/posts/${post.slug}/`, + link: url(`/posts/${post.slug}/`), content: sanitizeHtml(parser.render(cleanedContent), { allowedTags: sanitizeHtml.defaults.allowedTags.concat(["img"]), }),