Formatting
This commit is contained in:
@@ -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> {
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user