Skip to content

Commit

Permalink
refactor: add type to SITE object for better type safety
Browse files Browse the repository at this point in the history
  • Loading branch information
satnaing committed Mar 16, 2023
1 parent 2afdf4d commit 0c6d0ba
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/config.ts
Original file line number Diff line number Diff line change
@@ -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.",
Expand Down
10 changes: 10 additions & 0 deletions src/types.ts
Original file line number Diff line number Diff line change
@@ -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;
Expand Down

0 comments on commit 0c6d0ba

Please sign in to comment.