mirror of
https://github.com/hamster1963/nezha-dash.git
synced 2025-04-24 21:10:45 +08:00
feat(env): add disable index env
This commit is contained in:
parent
9202985fdc
commit
b5d0bc0b65
@ -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
|
||||
|
@ -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 = {
|
||||
|
@ -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.
|
||||
NEXT_PUBLIC_CustomDescription=NezhaDash is a dashboard for Nezha.
|
||||
NEXT_PUBLIC_DisableIndex=false
|
Loading…
Reference in New Issue
Block a user