Update to @astrojs/rss@3.0.0-rc.2

This commit is contained in:
prototypa
2023-08-25 13:25:38 -04:00
committed by widgeter
parent 076f372905
commit 082bfe853c
2 changed files with 9 additions and 10 deletions

View File

@ -1,4 +1,4 @@
import rss from '@astrojs/rss';
import { getRssString } from '@astrojs/rss';
import { SITE, METADATA, APP_BLOG } from '~/utils/config';
import { fetchPosts } from '~/utils/blog';
@ -14,7 +14,7 @@ export const GET = async () => {
const posts = await fetchPosts();
const { body = '' } = await rss({
const rss = await getRssString({
title: `${SITE.name}s Blog`,
description: METADATA?.description || '',
site: import.meta.env.SITE,
@ -29,8 +29,7 @@ export const GET = async () => {
trailingSlash: SITE.trailingSlash,
});
return new Response(body, {
status: 200,
return new Response(rss, {
headers: {
'Content-Type': 'application/xml',
},