mirror of
https://github.com/facebook/docusaurus.git
synced 2025-08-03 16:59:06 +02:00
fix(v2): Fix double trailingSlash in sitemap.xml (#4004)
When `trailingSlash` option is enabled, routes that already end in a `/` are shown with double slash at the end.
This commit is contained in:
parent
89a2ba7732
commit
8a9dfcf96c
1 changed files with 1 additions and 1 deletions
|
@ -24,7 +24,7 @@ export default function createSitemap(
|
|||
.filter((route) => !route.endsWith('404.html'))
|
||||
.map(
|
||||
(routesPath): SitemapItemOptions => ({
|
||||
url: `${routesPath}${trailingSlash && routesPath !== '/' ? '/' : ''}`,
|
||||
url: `${routesPath}${trailingSlash && !routesPath.endsWith('/') ? '/' : ''}`,
|
||||
changefreq,
|
||||
priority,
|
||||
}),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue