diff --git a/astro.config.mjs b/astro.config.mjs index 571987e..f1b1c16 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -22,6 +22,8 @@ const oklchToHex = function (str) { } export default defineConfig({ + site: 'https://fuwari.vercel.app/', + base: '/', integrations: [ tailwind(), icon({ diff --git a/src/config.ts b/src/config.ts index 43b6d96..837fc83 100644 --- a/src/config.ts +++ b/src/config.ts @@ -4,7 +4,6 @@ import {LinkPreset} from "./types/config.ts"; export const siteConfig: SiteConfig = { title: 'Fuwari', subtitle: 'Demo Site', - url: 'https://fuwari.vercel.app/', lang: 'en', themeHue: 250, banner: { diff --git a/src/types/config.ts b/src/types/config.ts index 18a2844..28fed2f 100644 --- a/src/types/config.ts +++ b/src/types/config.ts @@ -1,7 +1,6 @@ export type SiteConfig = { title: string, subtitle: string, - url: string, lang: string, diff --git a/src/utils/url-utils.ts b/src/utils/url-utils.ts index 0404a93..c09e8bf 100644 --- a/src/utils/url-utils.ts +++ b/src/utils/url-utils.ts @@ -1,4 +1,5 @@ import {siteConfig} from "../config.ts"; +import astroConfig from "../../astro.config.mjs" export function pathsEqual(path1: string, path2: string) { const normalizedPath1 = path1.replace(/^\/|\/$/g, '').toLowerCase(); @@ -24,5 +25,5 @@ export function getCategoryUrl(category: string): string | null { } export function getFullUrl(path: string): string { - return joinUrl(siteConfig.url, path); + return joinUrl(astroConfig.site || "", astroConfig.base || "", path); } \ No newline at end of file