chore: fix the astro rss content type.

This commit is contained in:
Yufan Sheng 2024-12-31 21:03:05 +08:00
parent 666c439d8e
commit 833c64a3cb
Signed by: syhily
GPG Key ID: 9D18A22A7DCD5A9B
5 changed files with 24 additions and 12 deletions

View File

@ -1,6 +1,6 @@
FROM node:lts AS base
WORKDIR /app
COPY package.json package-lock.json ./
COPY package.json package-lock.json patches ./
FROM base AS build
COPY . .
@ -10,7 +10,7 @@ RUN NODE_ENV=development npm install
RUN NODE_ENV=production npm run build
FROM base AS runtime
RUN npm install --omit=dev
RUN npm install --omit=dev && npx -y patch-package
COPY --from=build /app/dist ./dist
ENV HOST=0.0.0.0
ENV PORT=4321

View File

@ -87,13 +87,13 @@
"typescript": "^5.7.2",
"unist-util-select": "^5.1.0"
},
"packageManager": "npm@11.0.0",
"engines": {
"node": "22.12.0"
},
"overrides": {
"astro-uploader": {
"opendal": "0.47.7"
}
},
"packageManager": "npm@11.0.0",
"engines": {
"node": "22.12.0"
}
}

View File

@ -0,0 +1,13 @@
diff --git a/node_modules/@astrojs/rss/dist/index.js b/node_modules/@astrojs/rss/dist/index.js
index 24a3b42..d5d9eab 100644
--- a/node_modules/@astrojs/rss/dist/index.js
+++ b/node_modules/@astrojs/rss/dist/index.js
@@ -28,7 +28,7 @@ async function getRssResponse(rssOptions) {
const rssString = await getRssString(rssOptions);
return new Response(rssString, {
headers: {
- "Content-Type": "application/rss+xml; charset=utf-8"
+ "Content-Type": "application/xml"
}
});
}

File diff suppressed because one or more lines are too long

View File

@ -103,7 +103,7 @@ export const GET = async () => {
return rss({
title: options.title,
description: options.description,
stylesheet: urlJoin(import.meta.env.SITE, '/feed.xsl'),
stylesheet: '/feed.xsl',
site: import.meta.env.SITE,
items: feedPosts.map((post) => ({
link: urlJoin(import.meta.env.SITE, post.permalink),