diff --git a/docs/src/app/robots.ts b/docs/src/app/robots.ts index 91a7786..36331b2 100644 --- a/docs/src/app/robots.ts +++ b/docs/src/app/robots.ts @@ -1,10 +1,14 @@ import { MetadataRoute } from "next"; export default function robots(): MetadataRoute.Robots { + const hostUrl: string = + process.env.WEBSITE_URL ?? + "https://gabriel-logan.github.io/multiform-validator"; + return { rules: { userAgent: "*", }, - sitemap: "https://multiform-validator.3utilities.com/sitemap.xml", + sitemap: `${hostUrl}/sitemap.xml`, }; } diff --git a/docs/src/app/sitemap.ts b/docs/src/app/sitemap.ts index c9e1c3a..dbb51b2 100644 --- a/docs/src/app/sitemap.ts +++ b/docs/src/app/sitemap.ts @@ -1,6 +1,8 @@ import { MetadataRoute } from "next"; -const hostUrl: string = "https://multiform-validator.3utilities.com"; +const hostUrl: string = + process.env.WEBSITE_URL ?? + "https://gabriel-logan.github.io/multiform-validator"; function generateJsMaps(): MetadataRoute.Sitemap { const prefix: string = "documentation/js/functions";