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