From f4ddc9359a4c5c82fb5a40a675053c839c46df57 Mon Sep 17 00:00:00 2001 From: gabriel-logan Date: Mon, 27 May 2024 15:00:43 -0300 Subject: [PATCH] chore: update sitemap and robots --- docs/src/app/robots.ts | 6 +++++- docs/src/app/sitemap.ts | 4 +++- 2 files changed, 8 insertions(+), 2 deletions(-) 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";