Replace env values with SITE config object

This commit is contained in:
Sat Naing
2022-09-22 21:20:40 +06:30
parent eb27fbd33c
commit 9db22658ed
+5 -4
View File
@@ -1,4 +1,5 @@
--- ---
import { SITE } from "src/config";
import "../styles/base.css"; import "../styles/base.css";
export interface Props { export interface Props {
@@ -9,10 +10,10 @@ export interface Props {
} }
const { const {
title = import.meta.env.PUBLIC_SITE_TITLE, title = SITE.title,
author = import.meta.env.PUBLIC_AUTHOR, author = SITE.author,
description = import.meta.env.PUBLIC_SITE_DESC, description = SITE.desc,
ogImage = import.meta.env.PUBLIC_OG_IMAGE, ogImage = SITE.ogImage,
} = Astro.props; } = Astro.props;
const canonicalURL = new URL(Astro.url.pathname, Astro.site); const canonicalURL = new URL(Astro.url.pathname, Astro.site);