mirror of
https://github.com/community-scripts/ProxmoxVE
synced 2025-02-12 02:39:17 +00:00
Refactor sitemap generation to use centralized basePath from config, enhancing adaptability for URL management
This commit is contained in:
parent
b6ab3dd37d
commit
9b20f49bfe
@ -1,3 +1,4 @@
|
|||||||
|
import { basePath } from "@/config/siteConfig";
|
||||||
import type { MetadataRoute } from "next";
|
import type { MetadataRoute } from "next";
|
||||||
import { headers } from "next/headers";
|
import { headers } from "next/headers";
|
||||||
|
|
||||||
@ -9,11 +10,11 @@ export default async function sitemap(): Promise<MetadataRoute.Sitemap> {
|
|||||||
let protocol = "https";
|
let protocol = "https";
|
||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
url: `${protocol}://${domain}/${process.env.BASE_PATH}`,
|
url: `${protocol}://${domain}/${basePath}`,
|
||||||
lastModified: new Date(),
|
lastModified: new Date(),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
url: `${protocol}://${domain}/${process.env.BASE_PATH}/scripts`,
|
url: `${protocol}://${domain}/${basePath}/scripts`,
|
||||||
lastModified: new Date(),
|
lastModified: new Date(),
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
Loading…
Reference in New Issue
Block a user