diff --git a/src/components/Base.astro b/src/components/Base.astro index 5a9aaa8..ffa0cb0 100644 --- a/src/components/Base.astro +++ b/src/components/Base.astro @@ -27,7 +27,7 @@ const title = Astro.props.title rel="alternate" type="application/rss+xml" title="Your Site's Title" - href={new URL("rss.xml", Astro.site)} + href={new URL("rss", Astro.site)} /> diff --git a/src/pages/rss.xml.ts b/src/pages/rss/index.ts similarity index 89% rename from src/pages/rss.xml.ts rename to src/pages/rss/index.ts index b618c3e..6405fac 100644 --- a/src/pages/rss.xml.ts +++ b/src/pages/rss/index.ts @@ -25,8 +25,9 @@ export const GET: APIRoute = async ({ site }) => { /* its ssg so dynamic imports are fine. ../../ is bc it includes src/components so we need to go to project root */ - /* @vite-ignore */ - const { default: Component } = await import(`../../${post.filePath}`); + const { default: Component } = await import( + /* @vite-ignore */ `../../../${post.filePath}` + ); const content = await container.renderToString(Component); return { ...res, content: content }; diff --git a/src/pages/rss/style.ts b/src/pages/rss/style.ts new file mode 100644 index 0000000..e69de29