feat: add opentags
All checks were successful
Deploy to SFTP Server / build (push) Successful in 4m0s

This commit is contained in:
2025-02-18 16:23:51 +01:00
parent 19a703367d
commit 6aa6ddabb0
7 changed files with 39 additions and 3 deletions

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

@@ -0,0 +1,13 @@
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));
};