mirror of
https://github.com/ChenQihan666/MyBlog-Next.git
synced 2026-08-14 11:29:33 +08:00
Replace env values with SITE config object
This commit is contained in:
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user