| 1 | /** |
| 2 | * /atom.xml — Atom 1.0 feed of essays + interviews. |
| 3 | * |
| 4 | * Preserves the old htmx.org Zola-generated feed URL so existing RSS |
| 5 | * subscriptions and inbound backlinks keep working after the Astro migration. |
| 6 | */ |
| 7 | |
| 8 | import { buildFeed } from '../lib/feed'; |
| 9 | |
| 10 | /** @type {import('astro').APIRoute} */ |
| 11 | export const GET = async (context) => { |
| 12 | const feed = await buildFeed(context.site); |
| 13 | return new Response(feed.atom1(), { |
| 14 | status: 200, |
| 15 | headers: { 'Content-Type': 'application/atom+xml; charset=utf-8' }, |
| 16 | }); |
| 17 | }; |