From 19e9c37d7105eb5465d8bf2f73f037ec366d692b Mon Sep 17 00:00:00 2001 From: Troray Date: Fri, 2 Jan 2026 09:38:38 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=BB=E9=99=A4=E4=BA=86=E6=9C=AA=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=E7=9A=84getSiteConfig()=E5=87=BD=E6=95=B0,=E9=99=A4?= =?UTF-8?q?=E4=BA=86=E4=B8=8D=E5=BF=85=E8=A6=81=E7=9A=84get=E8=AE=BF?= =?UTF-8?q?=E9=97=AE=E5=99=A8,=E4=B8=80=E4=BA=9B=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/config/site-config.ts | 32 +++++++------------------------- 1 file changed, 7 insertions(+), 25 deletions(-) diff --git a/lib/config/site-config.ts b/lib/config/site-config.ts index 6bde571..fe9cd4a 100644 --- a/lib/config/site-config.ts +++ b/lib/config/site-config.ts @@ -10,30 +10,12 @@ export interface SiteConfig { } /** - * Get site configuration from environment variables - * Falls back to default values if not set + * Site configuration object + * Uses environment variables with fallback to default values + * Note: NEXT_PUBLIC_ environment variables are statically embedded at build time */ -export function getSiteConfig(): SiteConfig { - return { - title: process.env.NEXT_PUBLIC_SITE_TITLE || "KVideo - 视频聚合平台", - description: process.env.NEXT_PUBLIC_SITE_DESCRIPTION || "Multi-source video aggregation platform with beautiful Liquid Glass UI", - name: process.env.NEXT_PUBLIC_SITE_NAME || "KVideo", - }; -} - -/** - * Get individual configuration values - */ -export const siteConfig = { - get title() { - return process.env.NEXT_PUBLIC_SITE_TITLE || "KVideo - 视频聚合平台"; - }, - - get description() { - return process.env.NEXT_PUBLIC_SITE_DESCRIPTION || "Multi-source video aggregation platform with beautiful Liquid Glass UI"; - }, - - get name() { - return process.env.NEXT_PUBLIC_SITE_NAME || "KVideo"; - }, +export const siteConfig: SiteConfig = { + title: process.env.NEXT_PUBLIC_SITE_TITLE || "KVideo - 视频聚合平台", + description: process.env.NEXT_PUBLIC_SITE_DESCRIPTION || "Multi-source video aggregation platform with beautiful Liquid Glass UI", + name: process.env.NEXT_PUBLIC_SITE_NAME || "KVideo", }; \ No newline at end of file