mirror of
https://github.com/maelgangloff/domain-watchdog.git
synced 2025-12-29 16:15:04 +00:00
docs: add robots.txt
This commit is contained in:
13
docs/src/pages/robots.txt.ts
Normal file
13
docs/src/pages/robots.txt.ts
Normal 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));
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user