2024-02-13 05:50:53 +04:00
|
|
|
// https://docs.astro.build/en/guides/integrations-guide/sitemap/#usage
|
2025-01-05 23:48:23 +01:00
|
|
|
import type { APIRoute } from "astro";
|
2024-02-12 07:37:22 +04:00
|
|
|
|
|
|
|
|
const robotsTxt = `
|
2024-02-19 10:05:50 +04:00
|
|
|
User-agent: Googlebot
|
|
|
|
|
Disallow:
|
|
|
|
|
Allow: /
|
|
|
|
|
|
|
|
|
|
User-agent: Yandex
|
|
|
|
|
Disallow:
|
2024-02-12 07:37:22 +04:00
|
|
|
Allow: /
|
2024-02-19 10:05:50 +04:00
|
|
|
|
|
|
|
|
User-agent: archive.org_bot
|
|
|
|
|
Disallow:
|
|
|
|
|
Allow: /
|
|
|
|
|
|
2025-01-05 23:48:23 +01:00
|
|
|
Sitemap: ${new URL("sitemap-index.xml", import.meta.env.SITE).href}
|
2024-02-12 07:37:22 +04:00
|
|
|
`.trim();
|
|
|
|
|
|
|
|
|
|
export const GET: APIRoute = () => {
|
|
|
|
|
return new Response(robotsTxt, {
|
|
|
|
|
headers: {
|
2025-01-05 23:48:23 +01:00
|
|
|
"Content-Type": "text/plain; charset=utf-8",
|
2024-02-12 07:37:22 +04:00
|
|
|
},
|
|
|
|
|
});
|
2025-01-05 23:48:23 +01:00
|
|
|
};
|