Skip to content

Commit

Permalink
generate route to obey trailingSlash setting
Browse files Browse the repository at this point in the history
  • Loading branch information
atilafassina committed Apr 16, 2023
1 parent 0b727fb commit 0b07cec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/integrations/sitemap/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ const createPlugin = (options?: SitemapOptions): AstroIntegration => {
* remove the initial slash from relative pathname
* because `finalSiteUrl` always has trailing slash
*/
const path = finalSiteUrl.pathname + r.pathname.substring(1);
const path = finalSiteUrl.pathname + r.generate(r.pathname).substring(1);
const newUrl = new URL(path, finalSiteUrl).href;
urls.push(newUrl);
}
Expand Down

0 comments on commit 0b07cec

Please sign in to comment.