feat: use .ts instead of .yaml for configurations

This commit is contained in:
saicaca
2023-10-23 17:45:07 +08:00
parent 9f213d525f
commit 1ae4a8eee9
23 changed files with 4259 additions and 375 deletions

View File

@@ -6,7 +6,7 @@ import {pathsEqual} from "../utils/url-utils";
import Footer from "../components/Footer.astro";
import BackToTop from "../components/control/BackToTop.astro";
import DisplaySetting from "../components/widget/DisplaySetting.astro";
import {getConfig} from "../utils/config-utils";
import {siteConfig} from "../config";
interface Props {
title: string;
@@ -17,8 +17,7 @@ const { title, banner } = Astro.props;
const isHomePage = pathsEqual(Astro.url.pathname, '/') || pathsEqual(Astro.url.pathname, '/page/1');
const enableBanner = getConfig().banner.enable;
const enableBanner = siteConfig.banner.enable;
---