Skip to content

Commit 637361f

Browse files
Merge branch 'main' into fix/syntax-highlighting-astro-components
2 parents fc7f667 + 19cb19e commit 637361f

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

  • src/content/docs/en/guides/integrations-guide

src/content/docs/en/guides/integrations-guide/sitemap.mdx

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -423,6 +423,28 @@ export default defineConfig({
423423
});
424424
```
425425

426+
### filenameBase
427+
428+
The name prefix string used when generating the sitemap XML files. The default value is `sitemap`.
429+
430+
This option may be useful when integrating an Astro site into a domain with preexisting sitemap files.
431+
432+
```js title="astro.config.mjs" ins={8}
433+
import { defineConfig } from 'astro/config';
434+
import sitemap from '@astrojs/sitemap';
435+
436+
export default defineConfig({
437+
site: 'https://stargazers.club',
438+
integrations: [
439+
sitemap({
440+
filenameBase: 'astronomy-sitemap'
441+
}),
442+
],
443+
});
444+
```
445+
446+
The given configuration will generate sitemap files at `https://stargazers.club/astronomy-sitemap-0.xml` and `https://stargazers.club/astronomy-sitemap-index.xml`.
447+
426448
## Examples
427449

428450
* The official Astro website uses Astro Sitemap to generate [its sitemap](https://astro.build/sitemap-index.xml).

0 commit comments

Comments
 (0)