Skip to content

Commit ef255e6

Browse files
authored
fix: missing base path in rss (saicaca#551)
* fix missing base path in rss * sort imports
1 parent 7d5f18d commit ef255e6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/pages/rss.xml.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import rss from "@astrojs/rss";
22
import { getSortedPosts } from "@utils/content-utils";
3+
import { url } from "@utils/url-utils";
34
import type { APIContext } from "astro";
45
import MarkdownIt from "markdown-it";
56
import sanitizeHtml from "sanitize-html";
@@ -30,7 +31,7 @@ export async function GET(context: APIContext) {
3031
title: post.data.title,
3132
pubDate: post.data.published,
3233
description: post.data.description || "",
33-
link: `/posts/${post.slug}/`,
34+
link: url(`/posts/${post.slug}/`),
3435
content: sanitizeHtml(parser.render(cleanedContent), {
3536
allowedTags: sanitizeHtml.defaults.allowedTags.concat(["img"]),
3637
}),

0 commit comments

Comments
 (0)