diff --git a/astro.config.mjs b/astro.config.mjs index 9a73c75..684b7a3 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -13,12 +13,6 @@ import customTheme from './shiki/github-dark-default.json' // https://astro.build/config export default defineConfig({ - redirects:{ - "/rss.xml": { - status: 301, - destination:"https://yongseok.me/rss.xml" - } - }, i18n: { defaultLocale: 'ko', locales: ['ko', 'en'], diff --git a/src/pages/rss.xml.astro b/src/pages/rss.xml.astro new file mode 100644 index 0000000..a8ba397 --- /dev/null +++ b/src/pages/rss.xml.astro @@ -0,0 +1,3 @@ +--- +return Astro.redirect("https://yongseok.me/rss.xml"); +--- diff --git a/src/pages/rss.xml.js b/src/pages/rss.xml.js deleted file mode 100644 index 84e1b99..0000000 --- a/src/pages/rss.xml.js +++ /dev/null @@ -1,26 +0,0 @@ -import rss from '@astrojs/rss'; -import { getCollection } from 'astro:content'; -import { SITE_DESCRIPTION, SITE_TITLE } from '@consts'; - - - - -export async function GET(context) { - const posts = await getCollection("blog", ({ id }) => { - return !id.startsWith("en/"); - }) - - return rss({ - title: SITE_TITLE, - description: SITE_DESCRIPTION, - site: context.site, - items: posts.map((post) => { - return ({ - ...post.data, - pubDate: post.data.date, - link: `/blog/${post.slug}/`, - }) - }) - }); -} -