Astro Info
Astro v4.5.18
Node v18.18.0
System Linux (x64)
Package Manager unknown
Output static
Adapter none
Integrations @astrojs/sitemap
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
Using this Astro Config:
import { defineConfig } from 'astro/config';
import sitemap from '@astrojs/sitemap';
export default defineConfig({
site: 'https://example.com',
trailingSlash: 'never',
integrations: [sitemap()],
});
results in the following sitemap-0.xml being generated after astro build on a basic setup two pages index.astro and about.astro:
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:news="http://www.google.com/schemas/sitemap-news/0.9"
xmlns:xhtml="http://www.w3.org/1999/xhtml"
xmlns:image="http://www.google.com/schemas/sitemap-image/1.1"
xmlns:video="http://www.google.com/schemas/sitemap-video/1.1">
<url>
<loc>https://example.com/</loc>
</url>
<url>
<loc>https://example.com/about</loc>
</url>
</urlset>
What's the expected result?
All urls in the generated sitemap conform to the trailingSlash config option:
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:news="http://www.google.com/schemas/sitemap-news/0.9"
xmlns:xhtml="http://www.w3.org/1999/xhtml"
xmlns:image="http://www.google.com/schemas/sitemap-image/1.1"
xmlns:video="http://www.google.com/schemas/sitemap-video/1.1">
<url>
<loc>https://example.com</loc>
</url>
<url>
<loc>https://example.com/about</loc>
</url>
</urlset>
Link to Minimal Reproducible Example
https://stackblitz.com/edit/withastro-astro-6n4cpf?file=dist%2Fsitemap-0.xml
Participation
Astro Info
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
Using this Astro Config:
results in the following
sitemap-0.xmlbeing generated afterastro buildon a basic setup two pagesindex.astroandabout.astro:What's the expected result?
All urls in the generated sitemap conform to the
trailingSlashconfig option:Link to Minimal Reproducible Example
https://stackblitz.com/edit/withastro-astro-6n4cpf?file=dist%2Fsitemap-0.xml
Participation