feat(config): introduce site configuration file and update references

- Added a new site.config.ts file to manage site configuration, merging default settings with user-defined options.
- Updated import paths in tsconfig.json files for both SSR and web applications to reference the new site.config.ts.
- Modified usage of siteConfig in route.tsx and ActionGroup.tsx to ensure compatibility with the new configuration structure.
- Removed the old site configuration export from config/site.config.ts.

Signed-off-by: Innei <tukon479@gmail.com>
This commit is contained in:
Innei
2025-06-11 02:30:10 +08:00
parent b9fe7280c0
commit da509ed172
7 changed files with 50 additions and 6 deletions

45
site.config.ts Normal file
View File

@@ -0,0 +1,45 @@
import { merge } from 'es-toolkit/compat'
import userConfig from './config.json'
interface SiteConfig {
name: string
title: string
description: string
url: string
accentColor: string
author: Author
social?: Social
extra?: Extra
}
interface Author {
name: string
url: string
avatar?: string
}
interface Social {
twitter: string
}
interface Extra {
accessRepo: boolean
}
const defaultConfig: SiteConfig = {
name: "Innei's Photo Gallery",
title: "Innei's Photo Gallery",
description:
'Capturing beautiful moments in life, documenting daily warmth and emotions through my lens.',
url: 'https://gallery.innei.in',
accentColor: '#007bff',
author: {
name: 'Photo Gallery',
url: 'https://innei.in/',
avatar: '//cdn.jsdelivr.net/gh/Innei/static@master/avatar.png',
},
social: {
twitter: '@__oQuery',
},
}
export const siteConfig: SiteConfig = merge(defaultConfig, userConfig) as any
export default siteConfig