Download frontend/src/app/robots.ts from new-arc/vector: direct link, hf CLI and curl.
- Browser
- Download file 758 Bytes
-
https://huggingface.co/spaces/new-arc/vector/resolve/main/frontend/src/app/robots.ts
- Command line
-
hf download hf://spaces/new-arc/vector/frontend/src/app/robots.ts
-
curl -L -o robots.ts https://huggingface.co/spaces/new-arc/vector/resolve/main/frontend/src/app/robots.ts
758 Bytes
| import type { MetadataRoute } from "next"; | |
| import { getSiteUrl } from "@/lib/site"; | |
| const privatePaths = [ | |
| "/api/", | |
| "/admin/", | |
| "/list", | |
| "/settings/", | |
| "/tasks/", | |
| "/share/", | |
| ]; | |
| const aiCrawlers = [ | |
| "OAI-SearchBot", | |
| "GPTBot", | |
| "ChatGPT-User", | |
| "ClaudeBot", | |
| "Claude-SearchBot", | |
| "Claude-User", | |
| "PerplexityBot", | |
| "Perplexity-User", | |
| "Google-Extended", | |
| ]; | |
| export default function robots(): MetadataRoute.Robots { | |
| const siteUrl = getSiteUrl(); | |
| return { | |
| rules: [ | |
| { | |
| userAgent: "*", | |
| allow: "/", | |
| disallow: privatePaths, | |
| }, | |
| { | |
| userAgent: aiCrawlers, | |
| allow: "/", | |
| disallow: privatePaths, | |
| }, | |
| ], | |
| sitemap: `${siteUrl}/sitemap.xml`, | |
| host: siteUrl, | |
| }; | |
| } | |