You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adds a new configuration option `prefix` that allows you to change the default `sitemap-*.xml` file name.
6
+
7
+
By default, running `astro build` creates both `sitemap-index.xml` and `sitemap-0.xml` in your output directory.
8
+
9
+
To change the names of these files (e.g. to `astrosite-index.xml` and `astrosite-0.xml`), set the `prefix` option in your `sitemap` integration configuration:
10
+
11
+
```
12
+
import { defineConfig } from 'astro/config';
13
+
import sitemap from '@astrojs/sitemap';
14
+
export default defineConfig({
15
+
site: 'https://example.com',
16
+
integrations: [
17
+
sitemap({
18
+
prefix: 'astrosite-',
19
+
}),
20
+
],
21
+
});
22
+
```
23
+
24
+
This option is useful when Google Search Console is unable to fetch your default sitemap files, but can read renamed files.
0 commit comments