diff --git a/.env.example b/.env.example index b4a7dbe..1d155b4 100644 --- a/.env.example +++ b/.env.example @@ -12,3 +12,4 @@ NEXT_PUBLIC_FixedTopServerName=false NEXT_PUBLIC_CustomLogo=https://nezha-cf.buycoffee.top/apple-touch-icon.png NEXT_PUBLIC_CustomTitle=NezhaDash NEXT_PUBLIC_CustomDescription=NezhaDash is a dashboard for Nezha. +NEXT_PUBLIC_DisableIndex=false diff --git a/app/layout.tsx b/app/layout.tsx index 61e8806..a93e882 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -19,6 +19,7 @@ const fontSans = FontSans({ const customTitle = getEnv("NEXT_PUBLIC_CustomTitle"); const customDescription = getEnv("NEXT_PUBLIC_CustomDescription"); +const disableIndex = getEnv("NEXT_PUBLIC_DisableIndex"); export const metadata: Metadata = { manifest: "/manifest.json", @@ -29,6 +30,10 @@ export const metadata: Metadata = { title: customTitle || "NezhaDash", statusBarStyle: "black-translucent", }, + robots: { + index: disableIndex ? false : true, + follow: disableIndex ? false : true, + }, }; export const viewport: Viewport = { diff --git a/bun.lockb b/bun.lockb index d067936..8a8e816 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/docker/.env.example b/docker/.env.example index 21de401..a5e2bb9 100644 --- a/docker/.env.example +++ b/docker/.env.example @@ -11,4 +11,5 @@ NEXT_PUBLIC_ForceUseSvgFlag=false NEXT_PUBLIC_FixedTopServerName=false NEXT_PUBLIC_CustomLogo=https://nezha-cf.buycoffee.top/apple-touch-icon.png NEXT_PUBLIC_CustomTitle=NezhaDash -NEXT_PUBLIC_CustomDescription=NezhaDash is a dashboard for Nezha. \ No newline at end of file +NEXT_PUBLIC_CustomDescription=NezhaDash is a dashboard for Nezha. +NEXT_PUBLIC_DisableIndex=false \ No newline at end of file diff --git a/package.json b/package.json index 10fefd5..b50fc71 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "nezha-dash", - "version": "1.2.7", + "version": "1.2.8", "private": true, "scripts": { "dev": "next dev -p 3020", @@ -23,7 +23,7 @@ "@trivago/prettier-plugin-sort-imports": "^4.3.0", "@types/luxon": "^3.4.2", "@typescript-eslint/eslint-plugin": "^8.13.0", - "caniuse-lite": "^1.0.30001678", + "caniuse-lite": "^1.0.30001680", "class-variance-authority": "^0.7.0", "clsx": "^2.1.1", "country-flag-icons": "^1.5.13", @@ -34,9 +34,9 @@ "luxon": "^3.5.0", "next": "^15.0.3", "next-auth": "^5.0.0-beta.25", - "next-intl": "^3.24.0", + "next-intl": "^3.25.0", "next-runtime-env": "^3.2.2", - "next-themes": "^0.3.0", + "next-themes": "^0.4.3", "react": "19.0.0-rc-02c0e824-20241028", "react-device-detect": "^2.2.3", "react-dom": "19.0.0-rc-02c0e824-20241028", @@ -52,14 +52,14 @@ "devDependencies": { "eslint-plugin-turbo": "^2.2.3", "eslint-plugin-unused-imports": "^4.1.4", - "@next/bundle-analyzer": "15.0.2", + "@next/bundle-analyzer": "^15.0.3", "@types/node": "^22.9.0", "@types/react": "npm:types-react@19.0.0-rc.1", "@types/react-dom": "npm:types-react-dom@19.0.0-rc.1", "autoprefixer": "^10.4.20", "eslint": "^9.14.0", - "eslint-config-next": "15.0.2", - "postcss": "^8.4.47", + "eslint-config-next": "^15.0.3", + "postcss": "^8.4.48", "prettier": "^3.3.3", "prettier-plugin-tailwindcss": "^0.6.8", "tailwindcss": "^3.4.14",