mirror of
https://github.com/Afilmory/afilmory
synced 2026-04-25 07:15:36 +00:00
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:
45
site.config.ts
Normal file
45
site.config.ts
Normal 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
|
||||
Reference in New Issue
Block a user