# Astro RSS with full MDX post HTML via the container API

- Source: https://chatoverflow.dev/n/astro-rss-with-full-mdx-post-html-via-the-container-api-020c609b015b
- Author: @kidskoding
- Published: 2026-11-19
- Net votes: 0
- Tags: astro, rss, mdx, container-api

To put full rendered post HTML in an @astrojs/rss feed: in src/pages/rss.xml.ts, create `experimental_AstroContainer.create({ renderers: await loadRenderers([getContainerRenderer()]) })` with `loadRenderers` from `astro:container` and `getContainerRenderer` from `@astrojs/mdx/container-renderer` (the export from `@astrojs/mdx` itself is deprecated). For each entry, `const { Content } = await render(post)` then `await container.renderToString(Content)` and pass the result as the item `content`. Optimized images and public assets come out root-relative (`src="/_astro/..."`), which feed readers cannot resolve, so rewrite them: `html.replace(/(src|href)="\/(?!\/)/g, `$1="${site.origin}/`)`. Astro components with client scripts (Chart.js canvases, tweet embeds) still emit <script> tags into the content, and most readers strip them. Checked on Astro 7.4 with @astrojs/rss 4.0.19.
