Updated files
This commit is contained in:
@@ -5,7 +5,7 @@ services:
|
||||
image: postgres:16.4
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- 5433:5432
|
||||
- 5432:5432
|
||||
environment:
|
||||
- POSTGRES_PASSWORD=dev
|
||||
- POSTGRES_USER=dev
|
||||
|
||||
@@ -47,6 +47,7 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@eslint/eslintrc": "^3",
|
||||
"@next/eslint-plugin-next": "^15.3.4",
|
||||
"@tailwindcss/postcss": "^4",
|
||||
"@types/node": "^20",
|
||||
"@types/react": "^19",
|
||||
@@ -54,6 +55,7 @@
|
||||
"drizzle-kit": "^0.31.2",
|
||||
"eslint": "^9",
|
||||
"eslint-config-next": "15.3.4",
|
||||
"eslint-plugin-react-hooks": "^5.2.0",
|
||||
"tailwindcss": "^4",
|
||||
"tw-animate-css": "^1.3.4",
|
||||
"typescript": "^5"
|
||||
|
||||
6
pnpm-lock.yaml
generated
6
pnpm-lock.yaml
generated
@@ -96,6 +96,9 @@ importers:
|
||||
'@eslint/eslintrc':
|
||||
specifier: ^3
|
||||
version: 3.3.1
|
||||
'@next/eslint-plugin-next':
|
||||
specifier: ^15.3.4
|
||||
version: 15.3.4
|
||||
'@tailwindcss/postcss':
|
||||
specifier: ^4
|
||||
version: 4.1.10
|
||||
@@ -117,6 +120,9 @@ importers:
|
||||
eslint-config-next:
|
||||
specifier: 15.3.4
|
||||
version: 15.3.4(eslint@9.29.0(jiti@2.4.2))(typescript@5.8.3)
|
||||
eslint-plugin-react-hooks:
|
||||
specifier: ^5.2.0
|
||||
version: 5.2.0(eslint@9.29.0(jiti@2.4.2))
|
||||
tailwindcss:
|
||||
specifier: ^4
|
||||
version: 4.1.10
|
||||
|
||||
@@ -192,6 +192,7 @@
|
||||
* {
|
||||
@apply border-border outline-ring/50;
|
||||
}
|
||||
|
||||
body {
|
||||
@apply bg-background text-foreground;
|
||||
}
|
||||
|
||||
@@ -1,31 +1,12 @@
|
||||
import { getAllUrls } from "@/lib/db/urls"
|
||||
import type { MetadataRoute } from "next"
|
||||
|
||||
export const dynamic = "force-dynamic"
|
||||
|
||||
export default async function robots(): Promise<MetadataRoute.Robots> {
|
||||
const urls = await getAllUrls()
|
||||
|
||||
const crawlableUrls = urls.map(u => {
|
||||
if (u.crawlable) {
|
||||
return `/r/${u.slug}`
|
||||
}
|
||||
}).filter(v => typeof v === "string")
|
||||
|
||||
export default function robots(): MetadataRoute.Robots {
|
||||
return {
|
||||
rules: [
|
||||
{
|
||||
rules: {
|
||||
userAgent: "*",
|
||||
allow: "/",
|
||||
disallow: ["/api", "/dasboard", "/sign-in"],
|
||||
crawlDelay: 1
|
||||
},
|
||||
{
|
||||
userAgent: "*",
|
||||
disallow: "/r/",
|
||||
allow: crawlableUrls,
|
||||
crawlDelay: 1
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user