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";
export interface Props {
@@ -9,10 +10,10 @@ export interface Props {
}
const {
title = import.meta.env.PUBLIC_SITE_TITLE,
author = import.meta.env.PUBLIC_AUTHOR,
description = import.meta.env.PUBLIC_SITE_DESC,
ogImage = import.meta.env.PUBLIC_OG_IMAGE,
title = SITE.title,
author = SITE.author,
description = SITE.desc,
ogImage = SITE.ogImage,
} = Astro.props;
const canonicalURL = new URL(Astro.url.pathname, Astro.site);