移除了未使用的getSiteConfig()函数,除了不必要的get访问器,一些优化

This commit is contained in:
Troray
2026-01-02 09:38:38 +08:00
parent beae13fa1e
commit 19e9c37d71
+7 -25
View File
@@ -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",
};