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

This commit is contained in:
prototypa
2023-08-25 13:25:38 -04:00
parent 2f6c697e5f
commit 17186789a2
2 changed files with 9 additions and 10 deletions

View File

@ -13,11 +13,11 @@
"lint:eslint": "eslint . --ext .js,.ts,.astro"
},
"devDependencies": {
"@astrojs/mdx": "^1.0.0-rc.2",
"@astrojs/partytown": "^2.0.0-rc.1",
"@astrojs/rss": "^3.0.0-rc.1",
"@astrojs/sitemap": "^3.0.0-rc.1",
"@astrojs/tailwind": "^5.0.0-rc.1",
"@astrojs/mdx": "1.0.0-rc.2",
"@astrojs/partytown": "2.0.0-rc.1",
"@astrojs/rss": "^3.0.0-rc.2",
"@astrojs/sitemap": "3.0.0-rc.1",
"@astrojs/tailwind": "5.0.0-rc.1",
"@astrolib/analytics": "^0.4.2",
"@astrolib/seo": "^1.0.0-beta.4",
"@fontsource-variable/inter": "^5.0.8",
@ -27,7 +27,7 @@
"@types/lodash.merge": "^4.6.7",
"@typescript-eslint/eslint-plugin": "^6.4.1",
"@typescript-eslint/parser": "^6.4.1",
"astro": "^3.0.0-rc.5",
"astro": "3.0.0-rc.5",
"astro-compress": "^2.0.14",
"astro-icon": "^1.0.0-next.2",
"eslint": "^8.47.0",

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',
},