first commit
This commit is contained in:
commit
ff7c974867
227 changed files with 12908 additions and 0 deletions
15
src/pages/robots.txt.ts
Normal file
15
src/pages/robots.txt.ts
Normal file
|
@ -0,0 +1,15 @@
|
|||
import type { APIRoute } from "astro";
|
||||
|
||||
const getRobotsTxt = (sitemapURL: URL) => `
|
||||
User-agent: *
|
||||
Disallow: /cv
|
||||
Disallow: /privacy
|
||||
Allow: /
|
||||
|
||||
Sitemap: ${sitemapURL.href}
|
||||
`;
|
||||
|
||||
export const GET: APIRoute = ({ site }) => {
|
||||
const sitemapURL = new URL("sitemap-index.xml", site);
|
||||
return new Response(getRobotsTxt(sitemapURL));
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue