mirror of
https://github.com/saicaca/fuwari.git
synced 2026-01-11 14:52:52 +01:00
Some checks failed
Code quality / quality (push) Failing after 4s
Build and Check / Astro Check for Node.js 22 (push) Failing after 5s
Build and Check / Astro Check for Node.js 23 (push) Failing after 3s
Build and Check / Astro Build for Node.js 22 (push) Failing after 3s
Build and Check / Astro Build for Node.js 23 (push) Failing after 3s
* fix: disallow crawling from `/_astro/` * fix: add missing newline at end of robots.txt.ts file --------- Co-authored-by: Joey Chen <JoeyC-Dev@users.noreply.github.com> Co-authored-by: L4Ph <4ranci0ne@gmail.com>
17 lines
318 B
TypeScript
17 lines
318 B
TypeScript
import type { APIRoute } from "astro";
|
|
|
|
const robotsTxt = `
|
|
User-agent: *
|
|
Disallow: /_astro/
|
|
|
|
Sitemap: ${new URL("sitemap-index.xml", import.meta.env.SITE).href}
|
|
`.trim();
|
|
|
|
export const GET: APIRoute = () => {
|
|
return new Response(robotsTxt, {
|
|
headers: {
|
|
"Content-Type": "text/plain; charset=utf-8",
|
|
},
|
|
});
|
|
};
|