Formatting

This commit is contained in:
2025-06-28 00:15:51 +02:00
parent 0088b8f02a
commit 4ac986745d
22 changed files with 1180 additions and 1245 deletions

View File

@@ -1,5 +1,5 @@
import { getAllUrls } from '@/lib/db/urls'
import type { MetadataRoute } from 'next'
import { getAllUrls } from "@/lib/db/urls"
import type { MetadataRoute } from "next"
export default async function robots(): Promise<MetadataRoute.Robots> {
const urls = await getAllUrls()
@@ -8,7 +8,7 @@ export default async function robots(): Promise<MetadataRoute.Robots> {
if (u.crawlable) {
return `/r/${u.slug}`
}
}).filter(v => typeof v === 'string')
}).filter(v => typeof v === "string")
return {
rules: [
@@ -17,7 +17,8 @@ export default async function robots(): Promise<MetadataRoute.Robots> {
allow: "/",
disallow: ["/api", "/dasboard", "/sign-in"],
crawlDelay: 1
}, {
},
{
userAgent: "*",
disallow: "/r/",
allow: crawlableUrls,
@@ -25,4 +26,4 @@ export default async function robots(): Promise<MetadataRoute.Robots> {
}
]
}
}
}