import type { SiteConfig } from "@/types";
import dotenv from "dotenv";

// Load environment variables from .env file
dotenv.config();
const author = process.env.AUTHOR
const locale = process.env.LOCALE
const desc = process.env.DESCRIPTION

export const siteConfig: SiteConfig = {
	// Used as both a meta property (src/components/BaseHead.astro L:31 + L:49) & the generated satori png (src/pages/og-image/[slug].png.ts)
	author: author as string,
	// Date.prototype.toLocaleDateString() parameters, found in src/utils/date.ts.
	date: {
		locale: locale as string,
		options: {
			day: "numeric",
			month: "short",
			year: "numeric",
		},
	},
	// Used as the default description meta property and webmanifest description
	description: desc as string,
	// HTML lang property, found in src/layouts/Base.astro L:18 & astro.config.ts L:48
	lang: locale as string,
	// Meta property, found in src/components/BaseHead.astro L:42
	ogLocale: locale as string,
	// Used to construct the meta title property found in src/components/BaseHead.astro L:11, and webmanifest name found in astro.config.ts L:42
	title: author as string,
};

// Used to generate links in both the Header & Footer.
export const menuLinks: { path: string; title: string }[] = [
	{
		path: "/",
		title: "Home",
	},
	{
		path: "/about/",
		title: "About",
	},
	{
		path: "/posts/",
		title: "Blog",
	},
	{
		path: "/notes/",
		title: "Notes",
	},
];