From 0c6d0ba6cd63657c1ccf83dc197dd3933b835f8b Mon Sep 17 00:00:00 2001 From: satnaing Date: Thu, 16 Mar 2023 14:56:54 +0630 Subject: [PATCH] refactor: add type to SITE object for better type safety --- src/config.ts | 4 ++-- src/types.ts | 10 ++++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/config.ts b/src/config.ts index c8457cb..0b70e96 100644 --- a/src/config.ts +++ b/src/config.ts @@ -1,6 +1,6 @@ -import type { SocialObjects } from "./types"; +import type { Site, SocialObjects } from "./types"; -export const SITE = { +export const SITE: Site = { website: "https://astro-paper.pages.dev/", author: "Sat Naing", desc: "A minimal, responsive and SEO-friendly Astro blog theme.", diff --git a/src/types.ts b/src/types.ts index 6441dec..70f4254 100644 --- a/src/types.ts +++ b/src/types.ts @@ -1,3 +1,13 @@ +export type Site = { + website: string; + author: string; + desc: string; + title: string; + ogImage: string; + lightAndDarkMode: boolean; + postPerPage: number; +}; + export type SocialObjects = { name: SocialMedia; href: string;