diff options
Diffstat (limited to 'packages/integrations/sitemap/src/index.ts')
-rw-r--r-- | packages/integrations/sitemap/src/index.ts | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/packages/integrations/sitemap/src/index.ts b/packages/integrations/sitemap/src/index.ts index 4c049df91..4d280112b 100644 --- a/packages/integrations/sitemap/src/index.ts +++ b/packages/integrations/sitemap/src/index.ts @@ -98,6 +98,8 @@ const createPlugin = (options?: SitemapOptions): AstroIntegration => { .map((p) => { if (p.pathname !== '' && !finalSiteUrl.pathname.endsWith('/')) finalSiteUrl.pathname += '/'; + if (p.pathname.startsWith('/')) + p.pathname = p.pathname.slice(1); const fullPath = finalSiteUrl.pathname + p.pathname; return new URL(fullPath, finalSiteUrl).href; }); |