Support base directory in sitemap

This commit is contained in:
Soitora 2023-08-08 21:01:58 +02:00
parent 7d67ff8b73
commit b253030242
No known key found for this signature in database
GPG Key ID: A6D711EB4F2CCD97

View File

@ -12,7 +12,10 @@ import generateFeed from "./hooks/generateFeed";
export default ({ mode }) => {
process.env = { ...process.env, ...loadEnv(mode, process.cwd()) };
const hostname: string = process.env.VITE_HOSTNAME || "https://kodo.moe";
const baseUrl = process.env.VITE_HOSTNAME || "https://kodo.moe"
const basePath = process.env.VITE_BASE || "/"
const hostname: string = baseUrl + basePath.replace(/\/$/, "")
return defineConfig({
appearance: "dark",