mirror of
https://github.com/MCKero6423/fuwari.git
synced 2026-10-02 10:59:10 +00:00
fix: site url and base dir should be set in astro.config.mjs
This commit is contained in:
1 parent
d918a2ef3d
commit
b0d265b42b
4 files changed
+4
-3
No files matched your search
@@ -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: {
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
export type SiteConfig = {
|
||||
title: string,
|
||||
subtitle: string,
|
||||
url: string,
|
||||
|
||||
lang: string,
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
Reference in new issue
Block a user