Release #188

Merged
alexlebens merged 9 commits from main into release 2026-03-12 21:25:58 +00:00
Showing only changes of commit 4ef43534a0 - Show all commits

14
src/pages/robots.txt.ts Normal file
View File

@@ -0,0 +1,14 @@
// https://docs.astro.build/en/guides/integrations-guide/sitemap/#usage
import type { APIRoute } from 'astro';
const getRobotsTxt = (sitemapURL: URL) => `\
User-agent: *
Allow: /
Sitemap: ${sitemapURL.href}
`;
export const GET: APIRoute = ({ site }) => {
const sitemapURL = new URL('sitemap-index.xml', site);
return new Response(getRobotsTxt(sitemapURL));
};