Skip to content

Commit 4622c60

Browse files
committed
Fix RSS
The links generated were wrong.
1 parent e832d89 commit 4622c60

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/pages/rss.xml.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { getCollection } from "astro:content";
22
import rss from "@astrojs/rss";
33
import { SITE_DESCRIPTION, SITE_TITLE } from "../consts";
4+
import { getBlogPostUrl } from "../utils/blog";
45

56
export async function GET(context) {
67
const posts = await getCollection("blog");
@@ -10,7 +11,7 @@ export async function GET(context) {
1011
site: context.site,
1112
items: posts.map((post) => ({
1213
...post.data,
13-
link: `/blog/${post.id}/`,
14+
link: getBlogPostUrl(post),
1415
})),
1516
});
1617
}

0 commit comments

Comments
 (0)