diff --git a/src/services/config.ts b/src/services/config.ts index 6065132..e531069 100644 --- a/src/services/config.ts +++ b/src/services/config.ts @@ -1,10 +1,24 @@ import TOML from 'smol-toml'; import { CONFIG_PATH } from '@blog/config'; -export async function getSiteConfig() { +export type SiteConfig = { + title: string; + owner: { + name: string; + email: string; + }; + site: { + description: string; + url: string; + repo: string; + language: string; + copyright: string; + } +} + +export async function getSiteConfig(): Promise { const siteConfig = CONFIG_PATH + '/site.toml'; const file = Bun.file(siteConfig); const data = await file.text(); - - return TOML.parse(data); + return TOML.parse(data) as SiteConfig; }