diff --git a/src/pages/rss.xml.ts b/src/pages/rss.xml.ts index d09e38f..29410db 100644 --- a/src/pages/rss.xml.ts +++ b/src/pages/rss.xml.ts @@ -1,6 +1,6 @@ import rss from '@astrojs/rss'; import type { APIContext } from 'astro'; -import { experimental_AstroContainer } from 'astro/container'; +import { experimental_AstroContainer as AstroContainer } from 'astro/container'; import astroJSXRenderer from 'astro/jsx/renderer.js'; import { getCollection } from 'astro:content'; import sanitizeHtml from 'sanitize-html'; @@ -11,10 +11,10 @@ import { getBlogDescription } from '../lib/get-blog-description'; export async function GET(context: APIContext) { invariant(context.site); - const entries = await getCollection('blog'); - const container = await experimental_AstroContainer.create({ + const container = await AstroContainer.create({ renderers: [astroJSXRenderer], }); + const entries = await getCollection('blog'); const items = await Promise.all( entries .toSorted((a, b) => b.data.pubDate.valueOf() - a.data.pubDate.valueOf())